Thursday, December 24, 2015

Recovering .bashrc or .bash_profile

If you've mistakenly deleted your .bashrc or .bash_profile file and have an open terminal, just do this:

To recover your aliases, type:

alias


To recover your functions, type:

typeset -f


To recover your environment variables, type:

printenv


Then copy and paste appropriate lines into bashrc or bash_profile file again. Comment if I'm missing anything else.