Support my work ♥

Manually move /bin to /usr/bin after release upgrade

The problem is that do-release-upgrade from Ubuntu 18.04 LTS to Ubuntu 20.04 LTS does not do the move.

Fresh installations however get installed with the /usr/bin move already done.

So a shell script with the interpreter #!/usr/bin/bash will break.


First we must ensure that both /bin and /usr/bin are in the path

root@staging:~# echo $PATH

Do the move as root

Doing this migration on a production system should be save, in any case you must do a backup first and test said backup just in case of an emergency!

Now execute these steps and verify with the ls command at the end:

root@staging:~# cd /
root@staging:/# mv bin/* usr/bin/
root@staging:/# rmdir bin
root@staging:/# ln -s usr/bin bin
root@staging:/# ls -asl /bin
0 lrwxrwxrwx 1 root root 7 Nov 15 17:25 /bin -> usr/bin

Did you succeed? Consider donating to my blog 😃