Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PATH?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
lordbelial
n00b
n00b


Joined: 18 Jul 2003
Posts: 47

PostPosted: Tue Jan 11, 2005 9:20 pm    Post subject: PATH? Reply with quote

I was reading a post said to

Quote:
put it somewhere in my PATH so that I don't have to type the directory that it's in every time.


Whats PATH and how do I do it?
_________________
Gentoo
Athlon64 X2 3200+
2GB DDR2
GeForce 7900GS
--------------------------------------------------------
"It's only a gambling habit if you lose." :-D
Back to top
View user's profile Send private message
mosquito
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2004
Posts: 110

PostPosted: Tue Jan 11, 2005 9:42 pm    Post subject: Reply with quote

a path is the directories to a certain programe or file:

ex:

/usr/bin/firefox

is the path to firefox.
Back to top
View user's profile Send private message
lordbelial
n00b
n00b


Joined: 18 Jul 2003
Posts: 47

PostPosted: Tue Jan 11, 2005 9:50 pm    Post subject: Reply with quote

Where do I setup my system to be able to run a program no matter what directory Im in. E.G. to be able to run a game from any directory without having to go to that directory first.
_________________
Gentoo
Athlon64 X2 3200+
2GB DDR2
GeForce 7900GS
--------------------------------------------------------
"It's only a gambling habit if you lose." :-D
Back to top
View user's profile Send private message
mosquito
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2004
Posts: 110

PostPosted: Tue Jan 11, 2005 10:02 pm    Post subject: Reply with quote

you can make a symlink in /usr/bin or /usr/sbin to the programfile:

cd /usr/bin

ln -s /path/to/programe

then it should be possible for all users to run the programe nomatter what path you are at.
Back to top
View user's profile Send private message
mosquito
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2004
Posts: 110

PostPosted: Tue Jan 11, 2005 10:09 pm    Post subject: Reply with quote

forgot to tell you need to be root to make the symlink
Back to top
View user's profile Send private message
abcdefg
Apprentice
Apprentice


Joined: 29 Feb 2004
Posts: 216
Location: The Netherlands

PostPosted: Tue Jan 11, 2005 10:22 pm    Post subject: Reply with quote

lordbelial wrote:
Where do I setup my system to be able to run a program no matter what directory Im in. E.G. to be able to run a game from any directory without having to go to that directory first.


To see waht directorys are in your path type
Code:
echo $PATH

You can add direcotries to your path, for instance the game directory
Code:
export PATH=$PATH:/usr/games/bin

Now every executable file in /ust/games/bin can be runned without being in /usr/games/bin
If you want your path to be like this every time you start a terminal you can add the line to your ~/.bashrc or edit /etc/profile
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum