MEPISThis forum is for the discussion of MEPIS Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello all. My name is jason and I have a slight problem and Im new to linux. I actually found a similar thread but no solution. It did get me going in right direction, but as I ve said, no solution....that I know of.
I am running a mepis machine and I believe it is based on debian/ubuntu SQueeze. When I open konsole/terminal and type 'ifconfig' , I get "Command not found". Following some reading I found that ifconfig is in sbin folder of mepis.
I cd into sbin folder and typed ls. Sure enough, ifconfig is listed. So then, since i was already in the sbin folder, I typed 'ifconfig' again and I received the same 'command not found'. Can someone tell me what I am doing wrong ? I very much appreciate you taking time to read this as I am certain you have received this particulay query before.
Also on a side note: how come when I type something like "cd /home/username/Music", I get no file or directory exist. Yet if I type all of that without the /'s it works ? EX. "cd home username Music it works .
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
/sbin does not appear in the path of users, only of root.
Linux only executes programs which can be found in the path.
When you provide the full path: /sbin/ifconfig, the program is executed.
When you are in /sbin and try to execute something, the current directory is still not in your path.
Try ./ifconfig from within /sbin and it executes.
If you want to execute an action which requires root permissions you can use sudo. Then the path is also set correctly to execute programs from /sbin.
You also could add /sbin to your path, but then again it is for a reason that /sbin is not in your path.
Unlike windows, linux only uses the path environment when searching for a file regardless of your current working directory. Many distributions do not include the /sbin directory in the users path. In addition if you su root you will still use the users environment but su - will use root's environment. You can always use the full or absolute path i.e /sbin/ifconfig
Also . is a shortcut for current working directory so ./my_program will run a program in the current working directory regardless of absolute path.
cd my_directory will work only if there exists a subdirectory in the current directory called my_directory which is known as a relative path.
cd /my_directory is an absolute path.
linux is case sensitive so it difficult to tell if you made a mistake when using the absolute path.
Thanks for the responses. I don't know why I didnt try su or sudo before. I just didnt think to do that as it is debian based and Ive dabbled with ubuntu and I didnt have to sudo for theirs.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.