共 1 篇文章

标签:如何让Linux网卡自动激活? (linux网卡自动激活)

如何让Linux网卡自动激活? (linux网卡自动激活)

当我们安装好Linux系统后,有时候发现网卡不工作,怎么办呢?这时,我们需要手动激活网卡,才能连接网络。为了方便,我们可以让Linux自动激活网卡。本文将介绍如何让Linux网卡自动激活。 一、检查网卡 在开始设置前,我们需要先检查网卡。用ifconfig命令查看网卡是否存在,如果没有网卡信息,则表示没有激活网卡。 [root@localhost ~]# ifconfig eno16777736: flags=4163 mtu 1500 inet 192.168.1.101 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::20c:29ff:fe9a:ec87 prefixlen 64 scopeid 0x20 ether 00:0c:29:9a:ec:87 txqueuelen 1000 (Ethernet) RX packets 38290 bytes 48005313 (45.7 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 12106 bytes 997525 (974.5 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Loopback Local Ethernet) RX packets 427 bytes 39026 (38.0 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 427 bytes 39026 (38.0 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 从以上信息可以看出,本机有两个网卡:“eno16777736”和“lo”。其中,eno16777736为网卡名称。 二、查看网卡配置信息 使用命令“cat /etc/sysconfig/network-scripts/ifcfg-eno16777736”查看网卡配置信息。 [root@localhost...

技术分享