Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
Originally posted by Pimple 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?
The way you set the path will only be temporary. If you want the path to be permanent each time you login, you need to add it to your profile or users bashrc or kshrc files in their home directories.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.