How to add /sbin to the system path
I want to run any file from /sbin, /usr/sbin, /usr/local/sbin without specifying full path. Currently executables from these directories are not included. How can I do this?
|
I would have thought that at least /sbin would be included by default..??? What does "echo $PATH" show?
regardless, to add a directory to PATH: Code:
export PATH="$PATH:<item1>:<item2>..etc" |
Code:
[alex@localhost ~]$ echo $PATH Code:
export PATH="$PATH:/sbin:/usr/sbin:usr/local/sbin" How to make this change persistent? In Ubuntu, I can add script file to /etc/profile.d directory, and it is executed every time OS starts. Can I do this in RHEL? |
OK, works exactly as I expected. Thanks.
|
RHEL : When you do : su
.. then /sbin/ and /usr/sbin/ will not be in the PATH. Solution : su - ( su <space> <hyphen> ) |
All times are GMT -5. The time now is 09:08 PM. |