LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 07: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, 07: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, 08: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, 09: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, 10: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, 10: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, 10: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, 10: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, 11: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, 08: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 08:50 AM.
 
Old 07-22-2003, 08: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, 09: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

All times are GMT -5. The time now is 04:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration