ubuntu系统接了网线,却没能正常连接,用ifconfig也没能发现网卡,思前想后,明白了,因为网络是千兆位的,所以还是需要安装网卡才行,参照了以下原文解决了

转自:https://blog.csdn.net/sinat_39416814/java/article/details/89713728

ifconfig命令,检查网卡
发现只有

只有本地回环地址,没有以太网。

可能没有网卡驱动。

去英特尔网站下载

解压,会发现里面有个readme文件。

写的很详细怎么安装。


To build a binary RPM* package of this driver, run 'rpmbuild -tb
e1000e-<x.x.x>.tar.gz', where <x.x.x> is the version number for the driver tar
file.

Note: For the build to work properly, the currently running kernel MUST match
the version and configuration of the installed kernel sources. If you have just
recompiled the kernel reboot the system before building.

Note: RPM functionality has only been tested in Red Hat distributions.
lbank_line

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

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

Change to the driver src directory, where <x.x.x> is the version number
  for the driver tar:
  cd e1000e-<x.x.x>/src/

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.

  1. Load the module using the modprobe command:
      modprobe  [parameter=port1_value,port2_value]

Make sure that any older e1000e drivers are removed from the kernel before
  loading the new module:
  rmmod e1000e; modprobe e1000e

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

  ip address add <IP_address>/ dev ethX

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>


看起里好多,但是我们要做的很简单。

打开解压后的文件,里面是这些:

进入src文件夹

编译这个文件夹:

sudo make install
sudo modprobe e1000e
这时有线连接就出现了