Advertisement

How on earth do I make the PATH save?

Started by February 02, 2006 07:40 PM
4 comments, last by johnnyBravo 18 years, 9 months ago
Hi, I'm using Solaris 10, and I have to keep setting the PATH every time I login. eg PATH=$PATH:/whatever I've been searching the internet but I can't find anything that works. eg I've tried modifying the local.cshrc, local.login and local.profile, but they don't seem to be read when I login. But if I do something like: . local.profile the PATH that I defined works. Any ideas on making the PATH save? Thanks
Try simply ~/.profile. You also need to export the PATH variable after setting it, like this:
PATH=whateverexport PATH

Free Mac Mini (I know, I'm a tool)
Advertisement
Thanks, that works fine, although I am not able to find a .profile for the root user.

I did find a /etc/skel/.profile, but i'm pretty sure that is a template for new users.

Or is it just the /etc/profile ?

Thanks
Its the sceleton for new users :D
You can copy the .profile you have already to root's home dir, and it should work for root. Make sure it has the correct ownership/access bits for root though.

You can probably do it in /etc/profile too, to make the changes system wide.

I guess that if you are adding the path to a bunch of system utilities, using root's .profile is a good candidate. On the other hand, if you are adding the path to a folder with games, using the skeleton is a better idea, so that every new user gets it

[Edited by - pulpfist on February 3, 2006 1:55:21 AM]
The default home directory for the root user is / on Solaris. On my system, I created a separate home directory for root and placed a profile in there.
Free Mac Mini (I know, I'm a tool)
Thanks alot, its working fine.

The local.profile file confused me, I wonder why it's even there in the first place.

This topic is closed to new replies.

Advertisement