0

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.

0

1 Answer 1

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .