LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-17-2003, 06:28 AM   #1
dvong3
Member
 
Registered: Sep 2002
Posts: 168

Rep: Reputation: 30
Path


I like to add /usr/local/bin to my PATH. How do I do that? I try -- set PATH /usr/local/bin -- but i see no change.
 
Old 07-17-2003, 06:52 AM   #2
dalai
LQ Newbie
 
Registered: Jul 2003
Location: Paris
Distribution: MandrakeLinux
Posts: 6

Rep: Reputation: 0
export PATH=/usr/local/bin:$PATH

will put /usr/local/bin at the beginning of your PATH.
 
Old 07-17-2003, 07:21 AM   #3
dvong3
Member
 
Registered: Sep 2002
Posts: 168

Original Poster
Rep: Reputation: 30
Thanks. What if I want post at the end or remove any entry on my set?
 
Old 07-17-2003, 08:43 AM   #4
dalai
LQ Newbie
 
Registered: Jul 2003
Location: Paris
Distribution: MandrakeLinux
Posts: 6

Rep: Reputation: 0
in the end it is
export PATH=$PATH:/usr/local/bin
 
Old 07-17-2003, 09:18 AM   #5
dvong3
Member
 
Registered: Sep 2002
Posts: 168

Original Poster
Rep: Reputation: 30
I try your command but I get an error message. Now, I can't even use my ping command anymore.

$ export PATH=$PATH:/usr/local/bin
PATH=/usr/bin::/usr/dt/bin:/usr/openwin/bin:/bin//usr/ucb:/usr/local/bin: is not an identifier
 
Old 07-17-2003, 09:23 AM   #6
angelrod
Member
 
Registered: Oct 2002
Location: Mexico
Distribution: RedHat 9.0 and SuSE 8.1
Posts: 229

Rep: Reputation: 30
What do you get when you type?:

echo $PATH
 
Old 07-17-2003, 09:29 AM   #7
dalai
LQ Newbie
 
Registered: Jul 2003
Location: Paris
Distribution: MandrakeLinux
Posts: 6

Rep: Reputation: 0
there are a few problems in the resulting PATH

echo $PATH should give you what is your current PATH

To regain a proper path:
export PATH=/usr/bin:/usr/dt/bin:/usr/openwin/bin:/bin/usr/ucb:/usr/local/bin

it's all one the same line of course
 
Old 07-17-2003, 09:39 AM   #8
angelrod
Member
 
Registered: Oct 2002
Location: Mexico
Distribution: RedHat 9.0 and SuSE 8.1
Posts: 229

Rep: Reputation: 30
Quote:
Originally posted by dvong3
I try your command but I get an error message. Now, I can't even use my ping command anymore.

$ export PATH=$PATH:/usr/local/bin
PATH=/usr/bin::/usr/dt/bin:/usr/openwin/bin:/bin//usr/ucb:/usr/local/bin: is not an identifier
I think the problem is that you have one extra ":"
 
Old 07-17-2003, 10:13 AM   #9
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Or he originally typed:
export $PATH=$PATH:...
 
Old 07-22-2003, 07:36 AM   #10
dvong3
Member
 
Registered: Sep 2002
Posts: 168

Original Poster
Rep: Reputation: 30
OK..i was able to remove the extra : when I use bash shell to input the export command, orginally I was using sh. I guess you have to use bash shell because csh doesn't even work.

Last edited by dvong3; 07-22-2003 at 07:50 AM.
 
Old 07-22-2003, 07:51 AM   #11
cwolf
Member
 
Registered: Mar 2003
Location: Switzerland
Distribution: Sun Solaris 7/8/9, Fedora Core 3
Posts: 63

Rep: Reputation: 15
You have to add /usr/sbin/ to your PATH.
 
Old 07-22-2003, 08:02 AM   #12
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Quote:
Originally posted by dvong3
OK..i was able to remove the extra : when I use bash shell to input the export command, orginally I was using sh. I guess you have to use bash shell because csh doesn't even work.
csh uses different syntax entirely for setting environment variables (ie setenv).
 
  


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
Image Path reference in Linux (Absolute path) javabuddy Linux - General 7 06-05-2006 07:45 AM
Apache path and kde path questions darkraider Debian 1 11-12-2005 05:07 AM
Set the path systemwide/Set the path for a user with Slackware jayhel Slackware 1 06-12-2005 12:24 AM
Removing path form PATH maginotjr Linux - Newbie 3 02-12-2005 02:23 PM
How to Chnage Python's module search path (sys.path)? lramos85 Linux - Software 1 05-02-2004 06:10 PM

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

All times are GMT -5. The time now is 11:39 AM.

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