之前虚拟机ssh连接没问题,今天竟然连不上了。
打开虚拟机 ip a 网卡ens33没有ip
root@ubuntu:~/Desktop# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00:0c:29:95:50:e4 brd ff:ff:ff:ff:ff:ff
altname enp2s1
尝试命令ifup ens33,无济于事。
一顿如下操作也没反应。
root@ubuntu:~/Desktop# systemctl stop NetworkManager
root@ubuntu:~/Desktop# systemctl disable NetworkManager
root@ubuntu:~/Desktop# service network restart
Failed to restart network.service: Unit network.service not found.
root@ubuntu:~/Desktop# service network-manager restart
最后 root@ubuntu
————————————————
本文为博主原创文章,未经博主允许不得转载。
原文链接:https://blog.csdn.net/baidu_18624493/article/details/122297400