LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 11-11-2005, 01:56 PM   #1
flammable2
LQ Newbie
 
Registered: Nov 2005
Posts: 2

Rep: Reputation: 0
connecting /sbin/ifconfig to bash command ifconfig


I recently installed fedora 4 and unlike previous linux distro's, the /sbin/ scripts havnt been connected to the bash by the normal keywords. I realise there must be some sort of file where you can set these to connect.

Could somebody please tell me how to connect these commands to the single command instead of having to type /sbin/ infront of them?

Thank you!
 
Old 11-11-2005, 02:00 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
They're not "connected". They are "searched". You specify where to search with the PATH variable.

Have a look at /etc/profile and your user's .profile to see what PATH is being set to.

Should be something along the lines of:

PATH=/bin:/sbin:/usr/bin (etc...)
export PATH

(or export PATH=... as a shortcut)

Basically you just add each directory to search delimited by colon (. They will be searched in the order they appear.
 
Old 11-11-2005, 03:06 PM   #3
flammable2
LQ Newbie
 
Registered: Nov 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you, great reply! Will helped me alot!
 
Old 11-11-2005, 03:19 PM   #4
al2k
LQ Newbie
 
Registered: Nov 2005
Posts: 1

Rep: Reputation: 0
Not sure if this will help, but I recently just installed Fedora Core 4 on my laptop and was trying to access the 'ifconfig' command. I saw the command listed under /sbin but I couldn't access it. The problem was when I was got into superuser mode I was using the command 'su' but as soon as I used 'su -' everything worked fine. Hope that helps.
 
Old 11-12-2005, 07:58 AM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Good point al2k.

"su" by itself makes you the root user but doesn't invoke root's environment (root's own .profile) so you only have the environment you had a the user before the su. "su -" tells it to specifically to invoke root's environment when it switches user.
 
  


Reply



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
/sbin/ifconfig IP fix navaladi Linux - Networking 5 02-21-2005 05:49 AM
Bash says that config (ifconfig, chkconfig and others) don't exist Pedal2Metal Linux - Software 2 10-21-2004 05:50 AM
connecting to different access points using ifconfig etc. true_atlantis Linux - Wireless Networking 4 08-28-2004 05:47 PM
/sbin/ifconfig gives command not found - help dmalsbury Linux - Software 8 01-06-2004 09:14 PM
ifconfig command shoot2kill Linux - Networking 10 10-22-2003 12:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 01:57 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration