Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > MEPIS
User Name
MEPIS This forum is for the discussion of MEPIS Linux.


  Search this Thread
Old 09-30-2012, 05:36 PM   #1
LQ Newbie
Registered: Sep 2012
Location: USA
Posts: 2

Rep: Reputation: Disabled
Smile ifconfig and networking with windows 7

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 .
Old 09-30-2012, 06:28 PM   #2
Senior Member
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Stretch/Sid, Linux Mint DE
Posts: 4,633

Rep: Reputation: 711Reputation: 711Reputation: 711Reputation: 711Reputation: 711Reputation: 711Reputation: 711
/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.

Old 09-30-2012, 06:35 PM   #3
Registered: Aug 2002
Posts: 16,144

Rep: Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871
Welcome to LinuxQuestions.

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.

To slow....

Last edited by michaelk; 09-30-2012 at 06:39 PM.
Old 09-30-2012, 07:30 PM   #4
LQ Newbie
Registered: Sep 2012
Location: USA
Posts: 2

Original Poster
Rep: Reputation: Disabled
Smile thanks

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.

Anyway. Again thank you both.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is linux networking like windows networking in setting up a small office network? boondox Linux - Networking 6 01-26-2012 06:23 PM
Chaning hwaddr (networking / ifconfig) on CentOS 6.0 luftwaffe Linux - Networking 1 09-18-2011 12:06 PM > Forums > Linux Forums > Linux - Distributions > MEPIS

All times are GMT -5. The time now is 11:34 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration