Adding an entry to the PATH
How do I add an entry to the PATH in Solaris 8. I want to add an entry for Netscape Communicator. Thanks!!
|
Easiest way is to either edit the user's profile either if they using korn as their shell or bash, you'd want to add the path in their; kshrc or bashrc file, depending on what shell of course.
Or you can add it to the global file, /etc/profile |
it is faster to add a soft link in the /usr/sbin, which will then be accessible to all users. To do this, become su and cd into /usr/sbin. then type
ln -s /opt/netscape/netscape netscape and then press enter. this will put a link to the executable into the global path, as all users can get to /usr/sbin, and assumes that you installed netscape in the default location. Otherwise, substitute the absolute path of the netscape executable for what i have typed. otherwise, as trickykid said, the best place to declare the PATH variable is in one of the .profiles, or rc files, followed by the global profile |
Thanks guys. I kept digging on Google while I was waiting for a response and came up with:
env -i PATH=/opt/NTSPcom Is that an alternative to what you all suggested or do I still need to set the path using one of your methods? |
Quote:
I personally wouldn't setup a symlink, that can get messy. Also adding the directory in your path could make it easier for other programs or commands in the same directory to be executable instead of typing the full path or adding a dozen or so symlinks. |
I found a file in the Home directory called .dtprofile.
Is this the file and do I add: PATH=/opt/NTSPcom after the last line in the file? |
there is also a file called .cshrc
|
All times are GMT -5. The time now is 06:26 AM. |