1
rated 0 times
[
1]
[
0]
/ answers: 1 / hits: 791
/ 2 Years ago, sat, march 26, 2022, 5:42:09
I'm using in xubuntu bionic as shell bash.
I'll try to expand my $PATH for my user over $HOME/.profile.
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
The result is a little bit unexpected.
echo $PATH
/home/alex/.local/bin:/home/alex/bin:/home/alex/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
$HOME/bin is set twice. How can I avoid it?
In $HOME/.bashrc is nothing declared.
More From » command-line