HPE 9000 and HPE e3000 Servers
1847213 Members
2403 Online
110263 Solutions
New Discussion

Re: how do i add a path

 
SOLVED
Go to solution
Derek_2
Occasional Contributor

how do i add a path

can i add a path variable apllied for all the users logs into the system

derek
love to do anything
3 REPLIES 3
KapilRaj
Honored Contributor
Solution

Re: how do i add a path

add an entry in /etc/profile for this

example add a path to /usr/local

vi /etc/profile

at the last line you can add the following

PATH=$PATH:/usr/local;export PATH

kaps
Nothing is impossible
KapilRaj
Honored Contributor

Re: how do i add a path

hi you can have it by adding the path in /etc/PATH file also

see the man pages

kaps
Nothing is impossible
Shahul
Esteemed Contributor

Re: how do i add a path

Hi

Go to that particular directory and do like this.
Suppose U want to add /usr/lbin/sysadm in to the PATH variable
#cd /usr/lbin/sysadm
#PATH=$PATH:`pwd`

Verify By using
#echo $PATH

But this will disappear once U reboot. If U want permanent setting add in /etc/profile or $home/.profile or /etc/PATH files.


Best of luck

Shahul