Lately I started learning SHELL SCRIPTING. I was practicing some commands. Unfortunately I did "mv test1.sh /bin/sh". In test1.sh which is my practicing script file which has "hello" text only. After that I saw the text moved to /bin/sh file. I shut it down. While restarting OS is not loading. Note: I am able to see and select grub since I have dual OS(ubuntu,windows), but after selecting UBUNTU I am not able to see OS loaded. Please help me to overcome this issue.
1 Answer
As /bin/sh
in Ubuntu is just a symlink to /bin/dash
, it is very simple to restore it:
Boot to root shell and run these commands:
mount -o rw,remount /
rm -f /bin/sh
ln -s dash /bin/sh
Then restart and your system should work again.