In the command line, I appended a directory to my PATH without exporting it:
$ PATH='$PATH:/home/user/anaconda3/bin'
For some reason this has overwritten the PATH environment variable but I'm not sure why this happened. The PATH above is still a colon separated list of directories like it should be so what's the problem? I usually prepend a new directory to my PATH but this time I tested appending it instead which caused unexpected outcomes.
Now any time I try even the simplest commands like ls
I get this error (which I expect) followed by a prompt asking me to install the command I typed:
bash: sed: command not found...
Additionally, since I didn't acually export PATH, the subsequent commands are not supposed to inherit the environment of the above PATH variable so what caused it to happen?.
I know I can open a new terminal window to fix it but I'm interested in knowing why this happened?