How to change PATH variable permanently in solaris 10?

4.9k Views Asked by At

I'm using solaris 10 vm box, every time I login or open new terminal my PATH variable is getting reset to default, I'm using export PATH=XXX command to set my path. When I tried to change the content in /etc/skel/local.profile file changes are not getting accepted even after I set them to 777 with chmod, same when I tried to change the login file in /etc/default, and there is no file or directory named environment in /etc/ directory currently my shell shows bash. Can someone help to permanently change the PATH variable without setting it for every session?

1

There are 1 best solutions below

3
On

The /etc/skel folder is only used when you create a new user, its content is copied to the new user's home folder.

If you want to change the PATH variable everytime you login to your account, then add the following to the .profile file in your home folder (create it if it doesn't already exist):

export PATH=$PATH:/some/new/path