You are not logged in.

#1 2008-12-02 08:01:24

future stir-fry
Member
Registered: 2008-11-29
Posts: 55

[SOLVED] Symbolic link to /usr/local/bin

Hello,
In distros that I have used previously, ln-ing a script into /usr/local/bin would allow me to call the command without typing the entire path. This doesn't seem to occur in my Arch install. How do I get this to work?

Thanks.

Last edited by future stir-fry (2008-12-02 23:14:45)

Offline

#2 2008-12-02 08:22:27

Vintendo
Member
From: Netherlands
Registered: 2008-04-21
Posts: 375
Website

Re: [SOLVED] Symbolic link to /usr/local/bin

/usr/local/bin is not in $PATH in Arch by default

Offline

#3 2008-12-02 11:09:11

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: [SOLVED] Symbolic link to /usr/local/bin

Manually add it to the $PATH variable in /etc/profile, or this should do it automatically:

$ sudo sed -i '/^PATH/ s|"$|:/usr/local/bin"|' /etc/profile
$ . /etc/profile

ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#4 2008-12-02 11:12:34

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: [SOLVED] Symbolic link to /usr/local/bin

You should do that in /etc/profile.d, pacman overwrites /etc/profile.

Offline

#5 2008-12-02 11:15:28

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: [SOLVED] Symbolic link to /usr/local/bin

Yea, you're right.  Actually I was just about to edit my post that it might be better to do use ~/.bashrc instead of /etc/profile:

$ echo -e 'PATH="$PATH:/usr/local/bin"\nexport PATH' >> ~/.bashrc
$ . ~/.bashrc

Last edited by creslin (2008-12-02 11:27:26)


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#6 2008-12-02 17:50:02

string
Member
Registered: 2008-11-03
Posts: 286

Re: [SOLVED] Symbolic link to /usr/local/bin

Heh, how about:

echo 'export PATH="$PATH:/usr/local/bin"' >> ~/.bashrc

Offline

#7 2008-12-02 23:14:22

future stir-fry
Member
Registered: 2008-11-29
Posts: 55

Re: [SOLVED] Symbolic link to /usr/local/bin

Whoo victory! Thank you guys.

Offline

Board footer

Powered by FluxBB