Difference between ~/folder and /home/username/folder when creating a path in /etc/environment
Posted
by
r0xx4nne
on Ask Ubuntu
See other posts from Ask Ubuntu
or by r0xx4nne
Published on 2012-06-18T04:28:01Z
Indexed on
2012/06/18
15:23 UTC
Read the original article
Hit count: 312
I had an executable script on my ubuntu located on ~/project/
directory and I tried to add that path to /etc/environment
. So , I edit the path to this PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:~/project/"
. Then , I logout and login back , open the terminal as su
and run the command to execute my script on that folder but the result is command not found
.
Then, I change the path in /etc/environment
to PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/r0xx4nne/project/"
and voila it works.Now i can run the executable script inside ~/project/
without fail under su
command.
My question is , what's the difference between ~/project and /home/r0xx4nne/project when it comes in case of creating a path in /etc/environment ?
Why it happened to be like this? I am a newbie and I just want to know more . Thanks for any reply .
© Ask Ubuntu or respective owner