Ubuntu starts to enter the black screen tty interface can not connect to the network, can not enter the desktop

Wired networking on the ubuntu command line interface. 

# 尝试联网
$ sudo dhclient eth0

# 失败的话,查看网卡名称
$ dmesg | grep eth

# 发现eth0被重命名成了exxx0

# 重新联网
$ sudo dhclient exxx0

# 测试是否成功
$ ping www.baidu.com

It may be that I uninstalled Python before and accidentally deleted the software with auto remove, and the desktop could not get in. The set apt source can not be accessed (probably dns problem)

1, 按上述步骤联网

2,解决dns问题
$ sudo vi /etc/resolv.conf
加入
nameserver 127.0.1.1
#这里用的是阿里云的DNS服务器
nameserver 223.5.5.5  
nameserver 223.6.6.6

3,一定要更新一下
$ sudo apt-get update

4,重新安装桌面
$ sudo apt-get install xorg
$ sudo apt-get install ubuntu-desktop

After installation, you should be able to automatically enter the desktop, or press ctrl + alt + f1 to try

Thanks: https://blog.csdn.net/qq_16720391/article/details/86536748

https://blog.csdn.net/feiniao8651/article/details/60332535

Published 202 original articles · 80 praised · 300,000 views +

Guess you like

Origin blog.csdn.net/qxqxqzzz/article/details/105117639