LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices



Reply
 
Search this Thread
Old 04-19-2011, 02:39 AM   #1
ddegif
LQ Newbie
 
Registered: Apr 2011
Posts: 19

Rep: Reputation: 0
Talking PATH setting problem in Solaris 10


I have solaris 10 u9 installed, I as using default bash shell. I have tried to set a new PATH value by the following command
PATH=$PATH:/whtever/I/need
but I concede the variable is not persist in boot time even in closing a terminal.

So I enforced to ask u guys, how can I set environmental variable in Solaris which does not made u to do it again and again!!!

THX all of u , which will show ur faces for a help!!!
 
Old 04-19-2011, 03:28 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Hi,

You can set the new PATH in ~/.profile

Regards
 
1 members found this post helpful.
Old 04-19-2011, 03:45 AM   #3
ddegif
LQ Newbie
 
Registered: Apr 2011
Posts: 19

Original Poster
Rep: Reputation: 0
Is there a way to done it on command line? there is and to specify exactly wht is the command? I have tried to export using "export" and nothing is changed. And if someone know at minimum the files that are affected is encouraged
 
Old 04-19-2011, 04:24 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
You can put in ~/.profile:
Code:
export PATH=$PATH:/whtever/I/need
After that you have to logout/login again, or run
Code:
source ~/.profile
for the changes to take effect.
Note that no files are affected, since env. variables are stored in memory
 
Old 04-19-2011, 04:41 AM   #5
ddegif
LQ Newbie
 
Registered: Apr 2011
Posts: 19

Original Poster
Rep: Reputation: 0
I am on root account and, there is no a file ~/.profile under /(root). and does I have to create it? if I have to, I have fears on setting environments perfectly. so wht should I do next?
 
Old 04-19-2011, 05:05 AM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
If it doesn't exist, sure you need to create it.
If you fear to break something, open another terminal as root, create the .profile, source it and see if it works as expected. If something goes wrong and you can't unset the PATH, go to the previous terminal and delete .profile (or comment out the export statement).
 
  


Reply

Tags
path


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
just saying - hi [ how to set path in solaris permanently ] linuxmsg Solaris / OpenSolaris 20 08-29-2014 04:23 AM
Setting scala Path on slackware problem n3mbers Linux - Software 3 07-22-2009 11:04 AM
Problem setting PATH with X11 tarahmarie Linux - Newbie 6 09-06-2008 01:55 PM
Setting Path Problem Raakh Linux - Newbie 4 03-15-2008 02:02 PM
How to bring up path on screen in Solaris? depam Solaris / OpenSolaris 8 10-11-2007 03:46 AM


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