Welcome to the most active Linux Forum on the web.
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 06-09-2002, 12:28 PM   #1
Registered: Jun 2002
Location: USA
Distribution: RH7.3 & YDL2.1
Posts: 124

Rep: Reputation: 15
Exclamation Setting up ones shell correctly?

Total newbie question... this has got to be a seriously stupid one... but the answer eludes me, even after using linux hard core for a good year now...

When you 'su' into root from a remote station/user... many commands no longer work unless you type also the /usr/sbin or /sbin in front of the command.

So my question is... how do I add those two locations to the command lookup paths?

Its really bothersome to type those out all the time. When directly rooting into the machine physically (not remotely), this seems to be all set fine.

Its gotta be a config file somewhere ... I just cant find it.
Old 06-09-2002, 12:43 PM   #2
Senior Member
Registered: Nov 2001
Location: Wa. State
Distribution: Slackware
Posts: 1,261

Rep: Reputation: 45
Edit your /etc/profile file and add those two directories to the PATH= statment.
Old 06-09-2002, 12:47 PM   #3
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 250Reputation: 250Reputation: 250
when your su'ing to root, use this command to get the full path of root:

su -


su - root

and you should have /usr/sbin and /sbin in your path.
Old 06-09-2002, 12:57 PM   #4
Registered: Jun 2002
Location: USA
Distribution: RH7.3 & YDL2.1
Posts: 124

Original Poster
Rep: Reputation: 15
Thank you!

Both of those replies worked out fine. Have no clue why I just couldn't figure that out before, but thank you for the responses.


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
Alsa not setting up sound card correctly on boot rickh Debian 17 11-26-2005 09:53 AM
Setting dns in shell kinasz Linux - Networking 3 05-16-2004 12:28 AM
Setting Shell variables tmoorman Linux - Software 6 11-19-2003 03:41 PM
setting shell limit permanently? Alf829 Linux - General 2 07-30-2003 11:14 AM
setting up/ giving out shell accounts skeletal29 Linux - Security 2 08-25-2002 02:36 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:52 PM.

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