So I did something exceedingly stupid and now my .bashrc file is gone. Is there any way for me to recover it? I still have a terminal window open that uses the old bashrc file. If there's no way for me to recover it all (as I imagine there isn't) what else should I copy to a new .bashrc besides the old $PATH
? I'm on Ubuntu 12.04 if there is an OS-specific solution.
1 Answer
Ubuntu uses /etc/skel/.bashrc
as the base .bashrc
that gets copied into every new users home directory. Unless you have made custom changes you can simply copy /etc/skel/.bashrc
to your home directory and you will be set. If you have made custom changes then you will need to make them again.
set
can tell you a bit more than sole $PATH.export > export_list.txt; set > set_list.txt; functions > func_list.txt; alias > alias_list.txt
might get you most of what was there. Any logic will have to be rebuilt. Good luck.