I am a noobie. I tried searching the duplicates for answers, but none worked. I accidentally altered my $PATH
variable in my terminal when trying to install ghc. Every time I open a terminal window I get:
bash: export: `/.cabal/bin:/opt/ghc/7.6.3/bin:': not a valid identifier
bash: warning: here-document at line 120 delimited by end-of-file (wanted
EOF')
Command 'cat' is available in '/bin/cat'
The command could not be located because '/bin' is not included in the
PATH environment variable.
cat: command not found
When I type:
echo $PATH
it gives me the following:
/.cabal/bin:/opt/cabal/1.16/bin:/opt/ghc/7.6.3/bin:
I can fix it by typing:
source /etc/environment
But that's only for the current terminal session. If I close the window and open a new one, it goes back to the wrong $PATH
.
How can I permanently reset my $PATH
back to the default?
PATH
environment variable in~/.profile
or~/.bashrc
?~/.bashrc
to your question.~/.profile
and/or~/.bashrc
files from the/etc/skel
directory