刚安装完 ubuntu 16.04 系统,出现了一个奇怪的问题,插上网线,没有有线连接显示,这在以往的安装经历中是没有遇到过的,经过一番搜寻,特来总结一下解决过程。

新打开一个终端,输入 ifconfig 命令即可查看到网卡信息
在这里插入图片描述
只有本地回环,没有以太网,这是没有网卡驱动,需要自己安装一下网卡驱动。
英特尔网站下载一下linux版的网络适配器驱动程序。
可以连接无线网下载,台式机插上无线网卡即可上网,若没有无线网卡,利用其他电脑上网下载一下该压缩包即可。

在这里插入图片描述

压缩包中包含一个 REDME 文件,其中包含安装使用说明。


To manually build the driver

  1. Move the base driver tar file to the directory of your choice.
    For example, use ‘/home/username/e1000e’ or ‘/usr/local/src/e1000e’.

  2. Untar/unzip the archive, where <x.x.x> is the version number for the
    driver tar file:

    tar zxf e1000e-<x.x.x>.tar.gz

  3. Change to the driver src directory, where <x.x.x> is the version number
    for the driver tar:

    cd e1000e-<x.x.x>/src/

  4. Compile the driver module:

    make install

    The binary will be installed as:
    /lib/modules//updates/drivers/net/ethernet/intel/e1000e/e1000e.ko

    The install location listed above is the default location. This may differ
    for various Linux distributions.

  5. Load the module using the modprobe command.

    To check the version of the driver and then load it:

    modinfo e1000e
    modprobe e1000e [parameter=port1_value,port2_value]

    Alternately, make sure that any older e1000e drivers are removed from the
    kernel before loading the new module:

    rmmod e1000e; modprobe e1000e

  6. Assign an IP address to the interface by entering the following,
    where is the interface name that was shown in dmesg after modprobe:

    ip address add <IP_address>/ dev

  7. Verify that the interface works. Enter the following, where IP_address
    is the IP address for another machine on the same subnet as the interface
    that is being tested:

    ping <IP_address>

Note: For certain distributions like (but not limited to) Red Hat Enterprise
Linux 7 and Ubuntu, once the driver is installed, you may need to update the
initrd/initramfs file to prevent the OS loading old versions of the e1000e
driver. Use the dracut utility on Red Hat distributions:
# dracut --force

For Ubuntu:
# update-initramfs -u


以上说明较详细,但我们只需操作几步即可

#将压缩包解压
tar zxf e1000e-<x.x.x>.tar.gz

#将解压缩后的文件夹复制到 '/home/username/e1000e' or '/usr/local/src/e1000e'目录下
sudo cp -r "文件夹当前的位置" /usr/local/src/e1000e

#切换到该文件夹的src目录下
cd /usr/local/src/e1000e/e1000e-3.8.4/src/

#编译文件
sudo make install
sudo modprobe e1000e

此时右上角的有线连接就出现了。

参考链接:https://blog.csdn.net/sinat_39416814/article/details/89713728

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐