I accidentaly linked my root file system directories /bin and /sbin to /usr/bin and /usr/sbin instead of /mnt/bin and /mnt/sbin.
ln -sv /bin /usr/bin ln -sv /sbin /usr/sbin Then I wanted to revert it so I found on the internet that I could unlink them so I did:
unlink /bin unlink /sbin I didn't know what unlink does and now I see that it deleted my /bin and /sbin completely. Now no command works
ls -l zsh: command not found: sudo _user_host:1: command not found: who Is there a way to restore it and fix it? If I run a live CD and mount my partition and recreate the directories /bin/ /sbin and restore the symlinks to /usr/bin and /usr/sbin will that fix it?
echo *. From there, you can reset PATH or use a full path to execute commands such asln. If those directories are gone however, you will probably need to reinstall or upgrade which should preserve all data and configs.