I am trying to understand exporting paths in Bash, and someone had told me that
/bin is not the same as
~/bin. What is the difference between the two?
/bin always refers to the "bin" off of the root directory "/"
~ refers to the users home directory.
~/bin refers to bin off of the user's home directory.
If the user's home is
~/bin will be
~ seems to work in the
sh shell and its myriad of derivations, including
bash, which is what you asked about.
~/bin refers to the
bin directory in the current user's home directory.
It is equivalent to
If the current user's home directory is
~/bin refers to
/bin is an absolute path, its meaning is unambiguous.