I tried to move a binary from my /usr/bin
to my home directory on ubuntu WSL so I accidentally ran
sudo mv /usr/bin ~
Now I can't even open a new ubuntu terminal to undo the move.
I tried undoing the move from Windows by running:
wsl -e /home/<username>/usr/bin/sudo /home/<username>/usr/bin/mv /home/<username>/usr/bin /usr/bin
but I can't run any ubuntu commands from the wsl
command
Is there a way to undo the move or do I have to reinstall the WSL distro?
ext4.vhdx
in a virtual machine and then maybe try to move the directory back to its original location. See https://askubuntu.com/questions/1380253/where-is-wsl-located-on-my-computer for the location of the file. However, it might be easier to repair / reinstall WSL https://askubuntu.com/questions/761360/how-do-i-reset-my-installation-of-ubuntu-on-windows – Terrance Jan 17 '24 at 15:29