This question already has an answer here:

If an ubuntu workstation just shows the command line on starting up, is there a way to use the Ubuntu UI as well ? Or would the OS need to be reinstalled for it ?

The command line just showed,

Ubuntu 16.04.5 LTS <desktop name> tty1
<desktop name> login:

marked as duplicate by wjandrea, dessert command-line Feb 4 at 20:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.