LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This 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


Reply
  Search this Thread
Old 09-24-2003, 02:09 PM   #1
Pimple
Member
 
Registered: Sep 2001
Location: Houston
Distribution: Red Hat 7.0, 7.2,8,9, Mandrake 9.0, 9.2, Knoppix, DSL, Fedora Core 4,Solaris 8
Posts: 73

Rep: Reputation: 15
Question 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!!
 
Old 09-24-2003, 03:59 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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
 
Old 09-24-2003, 05:15 PM   #3
osprey0331
Member
 
Registered: Jul 2003
Location: California
Distribution: RH 7 and 8
Posts: 45

Rep: Reputation: 15
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
 
Old 09-24-2003, 09:56 PM   #4
Pimple
Member
 
Registered: Sep 2001
Location: Houston
Distribution: Red Hat 7.0, 7.2,8,9, Mandrake 9.0, 9.2, Knoppix, DSL, Fedora Core 4,Solaris 8
Posts: 73

Original Poster
Rep: Reputation: 15
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?
 
Old 09-25-2003, 12:18 AM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
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.
 
Old 09-25-2003, 12:38 PM   #6
Pimple
Member
 
Registered: Sep 2001
Location: Houston
Distribution: Red Hat 7.0, 7.2,8,9, Mandrake 9.0, 9.2, Knoppix, DSL, Fedora Core 4,Solaris 8
Posts: 73

Original Poster
Rep: Reputation: 15
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?
 
Old 09-25-2003, 12:40 PM   #7
Pimple
Member
 
Registered: Sep 2001
Location: Houston
Distribution: Red Hat 7.0, 7.2,8,9, Mandrake 9.0, 9.2, Knoppix, DSL, Fedora Core 4,Solaris 8
Posts: 73

Original Poster
Rep: Reputation: 15
there is also a file called .cshrc
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me: slowly booting when adding an entry in /etc/hosts jindo Linux - Networking 6 09-29-2005 10:45 AM
Adding a Boot.ini entry Tinochelli General 2 01-30-2005 02:20 AM
adding a new entry to grub? dr_zayus69 Linux - Software 8 12-30-2004 02:51 PM
adding menu entry in gnome brainlesspinkey Linux - Software 2 11-20-2004 08:38 PM
adding entry to grub questionasker Linux - General 4 03-18-2004 09:21 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 08:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration