[General] Where to set $PATH???
Hi all! I have a total mental meltdown. Where do i set the default path? I want to add a systemwide path. -- /Rikard --------------------------------------------------------------- Rikard Johnels email : rikjoh@norweb.se Web : http://www.rikjoh.com Mob : +46 735 05 51 01 PGP : 0x461CEE56 ---------------------------------------------------------------
On Friday 05 November 2004 1:34 pm, Rikard Johnels wrote:
Hi all!
I have a total mental meltdown. Where do i set the default path? I want to add a systemwide path. There are a couple of places. Probably the more standard is in /etc/profile. There are scripts specific to the various shells in /etc/profile.d, and /etc/initscript is also a place to put it since it is executed before /etc/inittab.
--
Jerry Feldman
On Friday 05 November 2004 19:52, Jerry Feldman wrote:
On Friday 05 November 2004 1:34 pm, Rikard Johnels wrote:
Hi all!
I have a total mental meltdown. Where do i set the default path? I want to add a systemwide path.
There are a couple of places. Probably the more standard is in /etc/profile. There are scripts specific to the various shells in /etc/profile.d, and /etc/initscript is also a place to put it since it is executed before /etc/inittab.
Isn't /etc/profile.d for additional packages that need an addition to /etc/profile, and isn't /etc/profile.local for additions done by the sysadmin? Cheers, Leen
On Friday 05 November 2004 20:18, Leendert Meyer wrote:
On Friday 05 November 2004 19:52, Jerry Feldman wrote:
On Friday 05 November 2004 1:34 pm, Rikard Johnels wrote:
Hi all!
I have a total mental meltdown. Where do i set the default path? I want to add a systemwide path.
There are a couple of places. Probably the more standard is in /etc/profile. There are scripts specific to the various shells in /etc/profile.d, and /etc/initscript is also a place to put it since it is executed before /etc/inittab.
Isn't /etc/profile.d for additional packages that need an addition to /etc/profile, and isn't /etc/profile.local for additions done by the sysadmin?
Cheers,
Leen I tried deducting the file to use by trying to locate the current path. But i didn't succeed. Where is the default path set?
<-examlpe output-> rikjoh@sparhawk:~> echo $PATH /home/rikjoh/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin rikjoh@sparhawk:~> -- /Rikard --------------------------------------------------------------- Rikard Johnels email : rikjoh@norweb.se Web : http://www.rikjoh.com Mob : +46 735 05 51 01 PGP : 0x461CEE56 ---------------------------------------------------------------
On Sunday, 7 November 2004 01.45, Rikard Johnels wrote:
I tried deducting the file to use by trying to locate the current path. But i didn't succeed. Where is the default path set?
It's set in /etc/profile, the section of code looks like this PATH=/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin if test "$HOME" != "/" ; then for dir in $HOME/bin/$CPU $HOME/bin ; do test -d $dir && PATH=$dir:$PATH done fi test "$UID" = 0 && PATH=/sbin:/usr/sbin:/usr/local/sbin:$PATH for dir in /var/lib/dosemu \ /usr/games \ /opt/bin \ /opt/gnome/bin \ /opt/kde3/bin \ /opt/kde2/bin \ /opt/kde/bin \ /usr/openwin/bin \ /opt/cross/bin do test -d $dir && PATH=$PATH:$dir done unset dir export PATH
On Friday 05 November 2004 10:52, Jerry Feldman wrote:
On Friday 05 November 2004 1:34 pm, Rikard Johnels wrote:
Hi all!
I have a total mental meltdown. Where do i set the default path? I want to add a systemwide path.
There are a couple of places. Probably the more standard is in /etc/profile. There are scripts specific to the various shells in /etc/profile.d, and /etc/initscript is also a place to put it since it is executed before /etc/inittab.
while we're on this path stuff, why is the current directory (the one you are currently in) not in the path. If it is not in the path inside linux (as in dos), why don't 'we' put in in the path statement. It is very agrevating to see a file, attempt to execute it and have the operating system say that the file cannot be found. I guess I've been using DOS too long. -- John Sowden American Sentry Systems. Inc. 1221 Andersen Drive San Rafael, CA 94901 U.L. Listed Central Station Alarm Service Serving the San Francisco Bay Area Since 1967 mail@americansentry.net http://www.americansentry.net
Today at 2:37pm, John Sowden wrote: [snip]
while we're on this path stuff, why is the current directory (the one you are currently in) not in the path. If it is not in the path inside linux (as in dos), why don't 'we' put in in the path statement. It is very agrevating to see a file, attempt to execute it and have the operating system say that the file cannot be found.
I guess I've been using DOS too long.
Probably true.... You should get used to simply putting "./" in front of the filename you're trying to run. The reason the current directory is not by default in the path is that it's not secure. Rather than try to explain in my own words, when there are many (~1,500,000, probably better) explanations "out there", point your favorite browser at Google and enter "current directory in path not secure". You should find enough to keep you occupied for a while. Jim
On Tue, 2004-11-09 at 14:37, John Sowden wrote:
I guess I've been using DOS too long. --
DOS will never die it will mearly retire to FloriDUH and let FreeDOS take over the business. -- _______ _______ _______ __ / ____\ \ / / ____|_ _\ \ / / | | \ \ /\ / / (___ | | \ \ / / | | \ \/ \/ / \___ \ | | \ \/ / | |____ \ /\ / ____) |_| |_ \ / \_____| \/ \/ |_____/|_____| \/ | \ /|\ || |\ / |~~\ /~~\ /~~| //~~\ | \ / | \ || | X |__/| || |( `--. |__ | | \| \_/ / \ | \ \__/ \__| \\__/
participants (7)
-
Anders Johansson
-
Carl William Spitzer IV
-
Jerry Feldman
-
Jim Cunning
-
John Sowden
-
Leendert Meyer
-
Rikard Johnels