LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 01-15-2005, 07:08 AM   #1
mickeyboa
Senior Member
 
Registered: May 2004
Location: Indianapolis, Indiana
Distribution: FC-KDE, 32 and 64 bit
Posts: 1,398

Rep: Reputation: 55
$PATH for root to /sbin


How do I give root direct path to /sbin ?
everytime I run a app in /sbin , I have to type /sbin/app . instead of just app.
Debian will allow to just type in app, why does RedHat complicate things ?

Jim

Last edited by mickeyboa; 01-15-2005 at 07:12 AM.
 
Old 01-15-2005, 07:16 AM   #2
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: Ubuntu, FreeBSD, NetBSD
Posts: 1,449

Rep: Reputation: 47
You just need to edit /root/.profile and add it to the PATH environment variable.

If you are su-ing to root you may need to use "su -" or add it to the user's path as well.
 
Old 01-15-2005, 08:40 AM   #3
mickeyboa
Senior Member
 
Registered: May 2004
Location: Indianapolis, Indiana
Distribution: FC-KDE, 32 and 64 bit
Posts: 1,398

Original Poster
Rep: Reputation: 55
In /root/bash_profile,
there is a entry PATH=$PATH:$HOME/bin
Should another entry be edited in, as,
PATH=$PATH:$HOME/sbin ??

Jim
 
Old 01-15-2005, 08:55 AM   #4
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: Ubuntu, FreeBSD, NetBSD
Posts: 1,449

Rep: Reputation: 47
Nope, change the line to read
Code:
PATH=$PATH:/sbin:$HOME/bin
If you put $HOME/sbin then it would look in /root/sbin which is not where the directory is located.
 
Old 01-15-2005, 09:15 AM   #5
mickeyboa
Senior Member
 
Registered: May 2004
Location: Indianapolis, Indiana
Distribution: FC-KDE, 32 and 64 bit
Posts: 1,398

Original Poster
Rep: Reputation: 55
Thanks for your help.

Jim
 
Old 01-15-2005, 09:29 AM   #6
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: Ubuntu, FreeBSD, NetBSD
Posts: 1,449

Rep: Reputation: 47
No problem... I am to assume that this solved the issue right? It works like you want it to now.
 
Old 01-15-2005, 11:07 AM   #7
mickeyboa
Senior Member
 
Registered: May 2004
Location: Indianapolis, Indiana
Distribution: FC-KDE, 32 and 64 bit
Posts: 1,398

Original Poster
Rep: Reputation: 55
Sure did.
I don't understand why RedHat does it that way.

Thanks again
Jim
 
  


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
/sbin path jstephens84 Fedora 3 11-16-2005 12:14 AM
/sbin path mickeyboa Fedora 7 11-13-2005 12:32 PM
Want2use /sbin cmds undr non-root account w/o sudo. Is it safe 2 add /sbin 2 my PATH? kornerr Linux - General 4 02-25-2005 09:29 AM
As root, not seeing /sbin and /usr/sbin in path weghman Linux - Newbie 3 04-25-2004 01:06 PM
/sbin path not included alaios Linux - Software 3 03-13-2004 11:01 AM


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