You are not logged in.
I'm sorry if what I'm looking for is not clear due to the Topic title, but it's the only phrase I can think of to explain what I need.
I'm reading this guide: http://linuxcommand.org/ and acording to it 'Most Linux distributions encourage a practice in which each user has a specific directory for the programs he/she personally uses. This directory is called bin and is a subdirectory of your home directory.'
So I went and created the bin folder in my home [where I have a "hello_world" script] and then added
PATH=$PATH:$HOME/binto my .bash_profile. Rebooted the system and... nothing happened, if I write the name of the script it just says it didn't find the order or something like it [it's in spanish].
How can I do this? basically what I want is to access those script kept in my /home/bin folder by its 'name'.
Thanks in advance!
Last edited by MGu3l (2015-06-15 07:30:21)
"Dream as if you'll live forever, live as if you'll die today" - James Dean
Offline
What is the output of `echo $PATH`?
Offline
Wait, is the file in /home/bin or $HOME/bin?
Offline
jasonwryan, this is the output:
/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perlscimmia, the file is in /home/miguel/bin ... I tried adding this route as well but it won't work.
"Dream as if you'll live forever, live as if you'll die today" - James Dean
Offline
So, it seems .bash_profile is not being read: please paste the file and the permissions on it.
Offline
This are the permissions of the file:
-rw-r--r-- 1 miguel users 129 jun 15 01:25 .bash_profile and this is the file itself:
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
PATH=$PATH:$HOME/bin"Dream as if you'll live forever, live as if you'll die today" - James Dean
Offline
# # ~/.bash_profile # [[ -f ~/.bashrc ]] && . ~/.bashrc [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx PATH=$PATH:$HOME/bin
You are declaring $PATH *after* an `exec` line so that part of ~/.bash_profile is never parsed -- see exec()
Put the PATH line *before* the `exec startx` line.
Jin, Jîyan, Azadî
Offline
Head_on_a_stick, that did the trick and now it's working! Thank you so much!!
1 Question, will it work if the folder is hidden... instead of bin a folder called .bin in my home?
Last edited by MGu3l (2015-06-15 07:18:31)
"Dream as if you'll live forever, live as if you'll die today" - James Dean
Offline
You're welcome ![]()
Please add "[SOLVED]" to the thread title for the benefit of others.
EDIT:
1 Question, will it work if the folder is hidden... instead of bin a folder called .bin in my home?
Only one way to find out...![]()
Last edited by Head_on_a_Stick (2015-06-15 07:22:10)
Jin, Jîyan, Azadî
Offline
Only one way to find out...
Jajajaj indeed... I just tried it and it works with a hidden folder.
"Dream as if you'll live forever, live as if you'll die today" - James Dean
Offline