[Sunhelp] How do you add /usr/ucb to your PATH

Magnus Abrante magnus.abrante at sweden.sun.com
Wed Oct 25 05:42:04 CDT 2000


> Newbie question........
>
> I need to add /usr/ucb to my PATH.  How can I do this ?
>
> Also, if anyone knows any good beginner WWW pages for Solaris the URL would
> be greatly appreciated.  All I have found thus far have proved useless to
> me.

Depends on if you would like to add it only for yourself, or system-wide,

if you want to add it for every user on the system you can add it do
/etc/default/login and the line which begins with PATH, if you only want
it to be in $PATH for root you can put it in SUPATH in the same file.


If you only want to add it for yourself it depends on the shell:
(echo $SHELL)
for tcsh, csh add "set path=( $path /usr/ucb )" to .cshrc or .tcshrc

for ksh and sh add "PATH=$PATH:/usr/ucb:" and "export PATH" to .profile .

for bash add "export PATH="$PATH:/usr/ucb" to .bash_profile .


In these examples I assumes that you want to add /usr/ucb to the
end of your path (the shell will search from the begining til the 
end of $PATH, first program found will be executed), since there
are some programs in /usr/ucb which you probably dont want to use,
such as cc. 

        //Magnus Abrante
/* This is my opinion and not the one of my empolyer */






More information about the SunHELP mailing list