Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-12-2013, 02:11 PM   #1
LQ Newbie
Registered: Oct 2013
Posts: 10

Rep: Reputation: Disabled
today ifconfig no work yesterday it did

I am not a computer person. I am taking my second course at the local JUCO and have a question. The text book has : enter the command "ifconfig". I do this and it comes back with command not found. I then type "whereis ifconfig" then it says that "/sbin /ifconfig" so I type it and get on with the lab. I want to know why yesterday it was different and today it needs teh /sbin??
Take care
Old 10-12-2013, 03:19 PM   #2
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 97
Hi albert,

Whether a command will be located depends largely on the contents of the $PATH environment variable. This is a list of directories (separated by colons), which will be searched for programs to execute. It can be different depending on your user and the version of Linux (among other things). For instance, /sbin is not in an ordinary user's $PATH in Debian by default, but it is (I think) in Ubuntu.

On my Debian laptop, you can see the difference, if I switch to the root user:

rob:~$ echo $PATH
rob:~$ sudo su - root
root:~# echo $PATH
However, I could choose to add /sbin to $PATH as my ordinary user (and even make it permanent by adding it in my .bashrc file):

rob:~$ PATH=${PATH}:/sbin
rob:~$ export PATH
rob:~$ echo $PATH
rob:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:19:b9:xx:xx:xx 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1

Last edited by Robhogg; 10-12-2013 at 03:37 PM.
Old 10-12-2013, 08:51 PM   #3
LQ Newbie
Registered: Oct 2013
Posts: 10

Original Poster
Rep: Reputation: Disabled
thanks RobHogg
It worked!


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
[Perl] Files from today or yesterday Cornholio Programming 2 11-26-2006 11:00 PM
I have no sound today...yesterday i did. TallAmericano Linux - Newbie 6 08-06-2006 09:12 AM
startx -- :1.0 worked yesterday but today.. slackist Linux - General 3 05-12-2005 10:35 AM
Yesterday I had audio, today I don't. mimsmall Linspire/Freespire 1 08-09-2004 04:43 PM
Today-Yesterday Axo LQ Suggestions & Feedback 6 07-15-2003 09:39 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:49 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