Marcel2008
02-27-2001, 05:50 PM
Hi,
I want to know how to set the path, so i can run certan files everywhere in the console.
Thanks
I want to know how to set the path, so i can run certan files everywhere in the console.
Thanks
|
Click to See Complete Forum and Search --> : How to set the default path ? Marcel2008 02-27-2001, 05:50 PM Hi, I want to know how to set the path, so i can run certan files everywhere in the console. Thanks freaker 02-27-2001, 06:50 PM I believe its the /etc/profile ~ sure I'll get corrected if I'm wrong though freaker :cool: Kinjana 02-27-2001, 07:30 PM Hi! Add lines like the following to the /etc/profile export PATH="$PATH:/yourpath:/other/path:" This will add things to the path for all users. You can also add a line like this, without the export statement, to a .bashrc file (or other shell, if you've changed the default) and have additional path searching for a particular user login -- Others may want to comment further, but I think the latter is the prefferred method so that system processes dont end up searching unnecessary directories. Kinj Dru Lee Parsec 02-27-2001, 07:47 PM I jsut wanted to add that if you want to add something to your path only for a particular user then you set the path in that user's .bash_profile SO if your user is "Bob" then he has a /home/Bob directory. In that directory is a .bash_profile file. Adding the path there will effect only Bob. Also, Notice how Kinjana said to export=$PATH:/some/new/path BE SURE to put teh $PATH: in there or instead of adding to your path you will overwrite the path. Lastly, here's the rule of thimb on path locations. Do it in /etc/profile and it effects all users. Do it in a user's .bash_profile and it effects that user whenever he's logged in (and btw, if you change it there the user has to log out and back in again to see the change) Do it in a user's .bashrc and it only effects him when he's in console mode or in a terminal window. Good luck. justlinux.com
Copyright Internet.com Inc. All Rights Reserved. |