Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What if the network card driver cannot be found in Linux operating system?

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "what to do if the Linux operating system can not find the network card driver". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what if the Linux operating system can't find the network card driver?"

1. Install the network card

The machine is too new to be recognized by the existing version of Linux, for example, the machine cannot find a network card, what should I do?

Don't worry, first of all, you need to know what model the network card is. Take the newly purchased computer in our laboratory as an example, its network card is integrated and the model is Realtek RTL8168/8111 PCI-E Gigabit Ethernet NIC. Then we go to Realtek's official website to download the corresponding Linux driver r8168-8.005.00.tar.bz2 and follow the instructions to install it.

Unpack the tarball:

# tar vjxf r8168-8.aaa.bb.tar.bz2

Change to the directory:

# cd r8168-8.aaa.bb

If you are running the target kernel, then you should be able to do:

# make clean modules (as root or with sudo)

# make install

# / sbin/depmod-a

# / sbin/insmod. / src/r8168.ko (or r8168.o in linux kernel 2.4.x)

You can check whether the driver is loaded by using following commands.

# / sbin/lsmod | grep r8168 (see if the Nic driver is loaded)

# / sbin/ifconfig-a (see if there is any information about the network card being started)

If there is a device name, ethX, shown on the monitor, the linux

Driver is loaded. Then, you can use the following command to activate

The ethX.

# ifconfig ethX up

, where Xerox 0pm 1pm 2pm...

Here you can also set the IP address by managing the → network through the system →, and finally activate it.

1. Set manually

A. Set the IP address of your machine.

# ifconfig ethX "the IP address of your machine"

B. Set the IP address of DNS.

Insert the following configuration in / etc/resolv.conf.

Nameserver "the IP address of DNS"

C. Set the IP address of gateway.

# route add default gw "the IP address of gateway"

2. Set by doing configurations in / etc/sysconfig/network-scripts

/ ifcfg-ethX for Redhat and Fedora, or / etc/sysconfig/network

/ ifcfg-ethX for SuSE. There are two examples to set network

Configurations.

A. Fix IP address:

DEVICE=eth0

BOOTPROTO=static

ONBOOT=yes

TYPE=ethernet

NETMASK=255.255.255.0

IPADDR=192.168.1.1

GATEWAY=192.168.1.254

BROADCAST=192.168.1.255

two。 Modify: # vi / etc/hosts, add two lines to the text:

127.0.0.1 localhost.localdomain localhost

192.168.4.101 node3 (set according to the machine itself)

Modify: vi / etc/hosts.equiv, add a line: (if you don't have the text, you can create one)

Node3

3. Start the ssh service

Most Linux versions should come with this program.

# ssh-keygen

# cd .ssh

# cp id_rsa.pub authorized_keys

# ssh node3 (if successful, the last login time will be displayed, and node3 is the hostname)

Additional information:

Ifup eth0 to see if you can start eth0.

Lsmod to see if the network card driver is loaded.

Dmesg to see if there is an error message when the network card starts.

At this point, I believe that everyone on the "Linux operating system can not find the network card driver what to do" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report