It sounds very much like your /bin/sh
and/or your /bin/dash
executable got borked somehow.
First, let's try to reinstall dash
:
sudo apt update
sudo apt install --reinstall dash
Then, reboot. If your system still doesn't work, we just need to relink it to /bin/dash
using this command:
sudo ln -fs /bin/dash /bin/sh
Give your machine a reboot just to ensure everything is cleared out of memory, and then try logging in.
The -f
option on ln
will force the system to build a link, even though the file already exists.
If your system complains that dash
can not be downloaded, run this command to install the latest version from the Xenial repos directly.
If you have a 64-bit system (the majority of people):
wget http://us.archive.ubuntu.com/ubuntu/pool/main/d/dash/dash_0.5.8-2.1ubuntu2_amd64.deb -qO dash.deb && sudo dpkg -i dash.deb && rm dash.deb
If you have a 32-bit system:
wget http://archive.ubuntu.com/ubuntu/pool/main/d/dash/dash_0.5.8-2.1ubuntu2_i386.deb -qO dash.deb && sudo dpkg -i dash.deb && rm dash.deb
You can check your architecture by running arch
. If it returns x86_64
, you have a 64-bit system. Otherwise, you have a 32-bit system or some weird system.
sudo ln -s /bin/dash /bin/sh
? – Zanna Apr 10 '17 at 16:35ln: failed to create symbolic link '/bin/sh': File exists
– 01000110 Apr 10 '17 at 16:43readlink -e /bin/sh
? – Zanna Apr 10 '17 at 16:45sudo apt install dash
? – Zanna Apr 10 '17 at 16:57dash is already the newest version (0.5.8-2.1ubuntu2).
– 01000110 Apr 10 '17 at 17:02/bin/dash
? – Zanna Apr 10 '17 at 17:06sudo apt install --reinstall dash
– Zanna Apr 10 '17 at 17:11Reinstallation of dash is not possible, it cannot be downloaded
. It makes me crazy! Nothing works correctly!!! – 01000110 Apr 11 '17 at 17:35ls -l /bin/sh
? – Kaz Wolfe Apr 11 '17 at 19:36lrwxrwxrwx 1 root root 4 ■■■■■ 9 11:19 /bin/sh -> dash
– 01000110 Apr 11 '17 at 19:57