I'm using VMWare, and running debian and whenever I run a new terminal my commands like "ls" seem to be lost.
I've tried the solutions listed here for instance: https://apple.stackexchange.com/questions/22859/bash-ls-command-not-found
When I do:
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
it works temporarily.
When I do:
cd ~
nano .bash_profile
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:$PATH
-- the file changes and the save reflects but when I open a new terminal the commands are forgotten again.
Edit:
rowen@debianRhys:~$ echo $PATH
/home/rowen/bin:PATH
source .bash_profile
bash: dircolors: command not found
echo "$PATH"
. Runsource .bash_profile
and check again. Edit your question and add the output. Also try to add it to.bashrc
instead. – pLumo Feb 24 '21 at 10:27I noticed it has these 3 lines at the bottom: 'PATH=~/bin:PATH PATH=~/bin:PATH PATH=~/bin:PATH'
– Rhys Feb 25 '21 at 11:40PATH
at the end of the shell's search path. This is likely due to a forgotten$
. Double check your.bash_profile
file. In a previous comment, you mentionPATH=~/bin:PATH
(etc.). This should definitely bePATH=~/bin:$PATH
. – Kusalananda Feb 25 '21 at 11:44