You are not logged in.

#1 2011-09-11 17:44:20

ninjaaron
Member
Registered: 2010-12-10
Posts: 296

[Solved]How do I add /home/user/bin to $PATH?

In ubuntu and debian, I could put my scripts in /home/user/bin and execute them anywhere like the programs in /usr/bin.  Is there a way to do this in arch?  If not, I guess I can just do a script that adds aliases for all of them everytime .bashrc starts.

Last edited by ninjaaron (2011-09-12 07:08:02)

Offline

#2 2011-09-11 17:47:42

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [Solved]How do I add /home/user/bin to $PATH?

Yes, the answer is found in many places. Do a forum search, read the bash manual (I assume your shell is bash), Google, etc.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#3 2011-09-11 17:47:52

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved]How do I add /home/user/bin to $PATH?

http://www.troubleshooters.com/linux/prepostpath.htm should work


Edit: Oh yes, this url is the taken from "add to path" Google search.

Last edited by karol (2011-09-11 17:49:00)

Offline

#4 2011-09-11 18:18:53

gazj
Member
From: /home/gazj -> /uk/cambs
Registered: 2007-02-09
Posts: 681
Website

Re: [Solved]How do I add /home/user/bin to $PATH?

I create a file in /etc/profile.d called custom.sh with the following contents.  Many examples / people will tell you to put it in ~/.bashrc but this makes your bin folder unavailable to your desktop environment.

gary@Lister ~ $ cat /etc/profile.d/custom.sh 
export PATH="$HOME/.bin:$PATH"

This way if pacman update /etc/profile your extra settings won't get wiped out or not get merged with a *.pacnew file

don't forget to give the file executable permissions

chmod a+x /etc/profile.d/custom.sh

EDIT: I have my bin folder hidden, if you don't want it hidden don't forget to change .bin to bin in the example above

Last edited by gazj (2011-09-11 18:22:34)

Offline

#5 2011-09-12 07:07:33

ninjaaron
Member
Registered: 2010-12-10
Posts: 296

Re: [Solved]How do I add /home/user/bin to $PATH?

bash manual.  who'da thought?
Thanks
Solved

Offline

Board footer

Powered by FluxBB