LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 04-17-2003, 02:22 AM   #1
Hollywood W
LQ Newbie
 
Registered: Feb 2003
Distribution: Red Hat 8.0
Posts: 27

Rep: Reputation: 15
ifconfig won't work


I go into my /sbin directory and can't seem to run ifconfig. it is found in the directory but it won't start up. I'm currently running RH 8. Feedback would be greatly appreciated.
 
Old 04-17-2003, 02:35 AM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
Tell us exactly what you are typing and what you're trying to accomplish.

cheers

Jamie...
 
Old 04-17-2003, 02:59 AM   #3
Hollywood W
LQ Newbie
 
Registered: Feb 2003
Distribution: Red Hat 8.0
Posts: 27

Original Poster
Rep: Reputation: 15
I type "ifconfig -a"
I am trying to accomplish a preview of my IP Address.
 
Old 04-17-2003, 03:02 AM   #4
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
Give this a try instead
Code:
cd /sbin
./ifconfig
It just looks like ifconfig isn't in your path. You are logged in as root yeah?

cheers

Jamie...
 
Old 04-17-2003, 03:24 AM   #5
Hollywood W
LQ Newbie
 
Registered: Feb 2003
Distribution: Red Hat 8.0
Posts: 27

Original Poster
Rep: Reputation: 15
hey that seemed to work and I wasn't logged in as root, how do I get it to work no matter what directory I'm in?
 
Old 04-17-2003, 03:29 AM   #6
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
/sbin isn't in the path of non-root users as most of those commands need yout to be root to do anything useful with. You can add it to your path (and everyone's path on the machines) by editing the PATH statement in /etc/profile. Alternatively if you just want to edit your user's path you can create a .profile/.bash_profile/.bashrc/.cshrc/whateverFileYourShellUses in your home directory and put a new PATH statement in there.

cheers

Jamie...
 
Old 04-17-2003, 03:49 AM   #7
Hollywood W
LQ Newbie
 
Registered: Feb 2003
Distribution: Red Hat 8.0
Posts: 27

Original Poster
Rep: Reputation: 15
Ok I set the PATH variable in the .profile of my user account. Do I need to log out and log in again to invoke the new .profile settings in order for this new PATH to work?
 
Old 04-17-2003, 03:51 AM   #8
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
You either need to logout and log back in, start a new shell, or run
Code:
source ~/.profile
You'll need to run the source command in every shell you have open if you choose to not logout/in.

cheers

Jamie...
 
Old 04-17-2003, 04:02 AM   #9
Hollywood W
LQ Newbie
 
Registered: Feb 2003
Distribution: Red Hat 8.0
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks alot for your help. Can I use the .profile as a startup on applications as well?
 
Old 04-17-2003, 04:07 AM   #10
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
I don't follow... The .profile file is typically used to define environment variables and carry out tasks at startup, you could start applications from it but you would end up starting those applications evertime you opened a shell.

Is that the answer to the question you asked or did I just answer the question I thought you were asking?

cheers

Jamie...
 
  


Reply


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
ifconfig doesn't work ccerino Fedora 9 08-04-2009 10:53 PM
ifconfig amounst other commands doesn't work steveman2000 Linux - Newbie 6 10-21-2005 04:15 PM
ifconfig & iwconfig do not work Koneko Linux - Newbie 3 08-06-2005 10:04 PM
ifconfig doesn't work woodland56 Linux - Newbie 7 03-09-2005 01:34 PM
My commands dont work. ifconfig ? slice4e Linux - General 5 05-08-2003 11:51 PM


All times are GMT -5. The time now is 10:44 AM.

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