VMware Ubuntu 无网卡驱动怎么办?

网上拷了一个VMware的Ubuntu系统,结果网络没法连接。

ifconfig命令一看,只有lo的本地回环网卡,没有真实网卡驱动。

很简单,一下三步就可以搞定。

首先,iplink show查看本地所有网卡。

我这里出现了一个ens33的网卡驱动,

ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

inet xxxxxx netmask 255.255.255.0 broadcast 192.168.0.255

inet6 fe80::20c:29ff:fe27:7ee8 prefixlen 64 scopeid 0x20<link>

ether 00:0c:29:27:7e:e8 txqueuelen 1000 (以太网)

RX packets 29 bytes 3043 (3.0 KB)

RX errors 0 dropped 0 overruns 0 frame 0

TX packets 66 bytes 8959 (8.9 KB)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536

inet 127.0.0.1 netmask 255.0.0.0

inet6 ::1 prefixlen 128 scopeid 0x10<host>

loop txqueuelen 1000 (本地环回)

RX packets 3059 bytes 219302 (219.3 KB)

RX errors 0 dropped 0 overruns 0 frame 0

TX packets 3059 bytes 219302 (219.3 KB)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

所以,我们这里就需要激活这个网卡驱动就行。

命令:sudo ifconfig ens33 up

然后,开启虚拟机的桥接模式,我这里是WiFi,所以选这个,大家自己可以尝试尝试。

最后,开启dhcp,分配IP

命令:sudo dhclient ens33

再重启网卡即可。sudo /etc/network-manager restart(可用可不用)

最后,自己ping一下baidu就可以了。

相关推荐
ltl6 小时前
大多数「无锁」代码其实不是无锁的
linux
ltl6 小时前
Linux 内核的内存屏障:一个让我调了三天的 bug
linux
Lonely 净土9 小时前
Rocky Linux 安装教程
linux·运维·服务器
光影少年9 小时前
RN的Fabric 渲染流程
运维·前端·javascript·react native·react.js·fabric
A 糖醋排骨9 小时前
grafana loki alloy轻量级日志采集
运维·grafana·loki
林间码客12 小时前
从DevOps到DevSecOps:构建现代软件交付的基石与护城河
大数据·运维·devsecops·devops
kyshipit12 小时前
Failed to take /etc/passwd lock: Invalid argument解决方案
ubuntu
李白你好12 小时前
Windows 离线 Linux 提权辅助查询工具
linux
Lust Dusk13 小时前
记一次Linux应急响应题目解析
linux·运维·服务器·网络·安全·网络安全
ShineWinsu14 小时前
对于Linux:五种IO模型以及非阻塞IO的详细解析
linux·c++·面试·io·阻塞·非阻塞·fcntl