Ubuntu: How to restore bash executable after accidentally delete it?


I accidentally doing something wrong, want I meant to do is:

ln -svf /bin/bash /bin/sh  

But, I miss typing it and become:

ln -svf /bin/sh /bin/bash  

So, bash is now a symlink that point to sh which is a symlink that point to dash. How can I restore my executable bash?



sudo apt-get install --reinstall bash  

Unless something goes wrong with the pre / post installation scripts, you should be able to reinstall bash and to collaterally replace the symlink with the executable. If this doesn't work, try to remove the symlink and try again. This will also upgrade bash to the latest version.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »