Ubuntu boots to a black screen

When Ubuntu boots to a black screen with a blinking cursor you probably need to reconfigure the display manager. This is what works for me on Ubuntu 20.04 LTS:

– Switch to a terminal mode console with CTRL+ALT+F3 (or if you have a running SSH server, log in from an other device)

– sudo dpkg --configure -a

– sudo dpkg-reconfigure gdm3

– Select ‘gdm3’.

– sudo service gdm3 restart