tty1 appears on the ubuntu18.04 login interface:

tty1 appears on the ubuntu18.04 login interface:
Reason: There is a problem with the desktop, and lightdm/gdm3 needs to be reinstalled

==================================================== ==============================
1. Try to connect to the Internet

sudo dhclient eth0

2. If it displays cannot find device “eth0”, execute the following command to view the network card name

dmesg | grep eth

#Discover that eth0 has been renamed to ens33
#ens33: renamed from eth0

3. Reconnect to the Internet

sudo dhclient ens33

4. Whether the test is successful

ping www.baidu.com

#If the networking is successful, install the ubuntu desktop

sudo apt-get install ubuntu-desktop
startx 
reboot

#Install lightdm/gdm3 (choose according to the system installed by the individual)

sudo apt install lightdm
sudo dpkg-reconfigure lightdm
reboot

If the update fails, follow this article to make changes:

==============================================================================

#Question: Enter the ifconfig command, only the loopback is displayed, and the ip address is not displayed.

1. First determine whether the local network card is enabled

lspci -v

2. View the local network port

ip a

3. Enable the ens33 network card

sudo dhclient ens33
ifconfig

4. Install netplan

sudo apt-get install netplan.io

5. Modify /etc/netplan/01-network-manager-all.yaml, here is 01-network-manager-all.yaml

sudo vi /etc/netplan/01-network-manager-all.yaml
network:
    ethernets:
        ens160:
            addresses: [192.168.7.100/24] # IP及掩码
            gateway4: 192.168.7.1 # 网关
            nameservers:
                addresses: [192.168.7.1] # DNS
    version: 2
 

# restart the application

sudo netplan apply
reboot

Guess you like

Origin blog.csdn.net/qq_43604945/article/details/129218518