- How to install a device driver on Linux
- Learn how Linux drivers work and how to use them.
- Subscribe now
- Two approaches to finding drivers
- 1. User interfaces
- 2. Command line
- Check if a driver is already installed
- Add the repository and install
- How to check network adapter status in Linux
- Command to check network adapter names in Linux
- Getting IP address and other information
- How to query or control network driver and hardware settings in Linux
- Display the physical status of an Ethernet port in Linux
- See network device driver information
- Is eno1 Ethernet device is up or down?
- A note abou Find Wireless Wifi Driver Chipset Informationt checking Wireless network adapter status in Linux
- Ubuntu Documentation
- 1. Check for Loaded Device Drivers
- 2. Choosing, Finding and Installing Drivers
- 2.1. Using Native Linux Drivers
- 2.2. Using ndiswrapper for Cards Without a Linux Driver
- 3. Check Driver
- 3.1. Multiple drivers loaded
- 3.2. Driver looks ok, device disabled
- Checking Driver and Firmware Versions in Linux OS
- Procedure
How to install a device driver on Linux
Learn how Linux drivers work and how to use them.
Subscribe now
Get the highlights in your inbox every week.
One of the most daunting challenges for people switching from a familiar Windows or MacOS system to Linux is installing and configuring a driver. This is understandable, as Windows and MacOS have mechanisms that make this process user-friendly. For example, when you plug in a new piece of hardware, Windows automatically detects it and shows a pop-up window asking if you want to continue with the driver’s installation. You can also download a driver from the internet, then just double-click it to run a wizard or import the driver through Device Manager.
Second, most default Linux drivers are open source and integrated into the system, which makes installing any drivers that are not included quite complicated, even though most hardware devices can be automatically detected. Third, license policies vary among the different Linux distributions. For example, Fedora prohibits including drivers that are proprietary, legally encumbered, or that violate US laws. And Ubuntu asks users to avoid using proprietary or closed hardware.
To learn more about how Linux drivers work, I recommend reading An Introduction to Device Drivers in the book Linux Device Drivers.
Two approaches to finding drivers
1. User interfaces
If you are new to Linux and coming from the Windows or MacOS world, you’ll be glad to know that Linux offers ways to see whether a driver is available through wizard-like programs. Ubuntu offers the Additional Drivers option. Other Linux distributions provide helper programs, like Package Manager for GNOME, that you can check for available drivers.
2. Command line
What if you can’t find a driver through your nice user interface application? Or you only have access through the shell with no graphic interface whatsoever? Maybe you’ve even decided to expand your skills by using a console. You have two options:
- Use a repository
This is similar to the homebrew command in MacOS. By using yum, dnf, apt-get, etc., you’re basically adding a repository and updating the package cache.
- Download, compile, and build it yourself
This usually involves downloading a package directly from a website or using the wget command and running the configuration file and Makefile to install it. This is beyond the scope of this article, but you should be able to find online guides if you choose to go this route.
Check if a driver is already installed
Before jumping further into installing a driver in Linux, let’s look at some commands that will determine whether the driver is already available on your system.
The lspci command shows detailed information about all PCI buses and devices on the system:
Or with grep:
For example, you can type lspci | grep SAMSUNG if you want to know if a Samsung driver is installed.
The dmesg command shows all device drivers recognized by the kernel:
Or with grep:
Any driver that’s recognized will show in the results.
If nothing is recognized by the dmesg or lscpi commands, try these two commands to see if the driver is at least loaded on the disk:
Tip: As with lspci or dmesg, append | grep to either command above to filter the results.
If a driver is recognized by those commands but not by lscpi or dmesg, it means the driver is on the disk but not in the kernel. In this case, load the module with the modprobe command:
Run as this command as sudo since this module must be installed as a root user.
Add the repository and install
There are different ways to add the repository through yum, dnf, and apt-get; describing them all is beyond the scope of this article. To make it simple, this example will use apt-get, but the idea is similar for the other options.
1. Delete the existing repository, if it exists.
where NAME_OF_DRIVER is the probable name of your driver. You can also add pattern match to your regular expression to filter further.
2. Add the repository to the repolist, which should be specified in the driver guide.
where REPOLIST_OF_DRIVER should be specified from the driver documentation (e.g., epel-list).
3. Update the repository list.
4. Install the package.
5. Check the installation.
Run the lscpi command (as above) to check that the driver was installed successfully.
Источник
How to check network adapter status in Linux
Command to check network adapter names in Linux
Open the Terminal application and type the following command to see all network device names and other info:
sudo lshw -class network -short
Sample outputs:
So wlp1s0 is my Wireless and eno1 is my Ethernet Connection.
Getting IP address and other information
Simply use the ip command as follows:
How to query or control network driver and hardware settings in Linux
For wired Ethernet devices, you need to use a command called ethtool. It provides the following information from the Linux CLI
- Display info about network adapter status
- Find identification and diagnostic information
- Get extended device statistics
- Set or get speed, duplex, autonegotiation and flow control for Ethernet devices
- Control checksum offload and other hardware offload features
- Update or set DMA ring sizes and interrupt moderation
- Control receive queue selection for multiqueue devices
- Upgrade firmware in flash memory
Display the physical status of an Ethernet port in Linux
The syntax is:
sudo ethtool
sudo ethtool [option]
For example, get info about eno1 Ethernet device:
sudo ethtool eno1
Sample outputs:
See network device driver information
Run:
sudo ethtool -i eno1
Is eno1 Ethernet device is up or down?
Run the following cat command:
cat /sys/class/net/eno1/carrier
cat /sys/class/net/eno1/operstate
Another option is use the ip command along with grep command/egrep command:
ip a s eno1 | grep state
OR
sudo ethtool eno1 | grep -i ‘Link det’
OR
nmcli device status
Various command to check your network connections on Linux
A note abou Find Wireless Wifi Driver Chipset Informationt checking Wireless network adapter status in Linux
To find Wireless (Wifi) driver chipset information on Linux, run:
lspci | less
lspci | grep -i intel
lspci | grep -i broadcom
lspci | grep -i wireless
lshw -C network | grep -B 1 -A 12 ‘Wireless interface’
Sample outputs:
Источник
Ubuntu Documentation
Wireless Troubleshooting Guide
This part of the guide is designed to help you troubleshoot your wireless adpater’s driver issues. This page is part of the WirelessTroubleShootingGuide. You should have correctly identified your device as detailed in the Devices page of this guide. See also the comprehensive explanations of commands for troubleshooting your wireless.
1. Check for Loaded Device Drivers
First you should check if a driver automatically loaded. (Your device may be supported in Ubuntu with a native driver.) Use the lshw command. As explained under lshw, if there is a line saying configuration: . driver=. in the description of the wireless card, this indicates the driver is installed.
If you are not running the most recent kernel, update your system (System > Administration > Update Manager). Drivers, especially wireless, are constantly being added and modified.
2. Choosing, Finding and Installing Drivers
2.1. Using Native Linux Drivers
Check in System > Administration > Hardware Drivers for a binary driver. For instance, many Broadcom cards will work with the Broadcom STA driver. Unfortunately, the driver is proprietary (the source code is not freely available), and so cannot be installed automatically as part of Ubuntu. If you are willing to accept this limitation, activate the driver.
2.2. Using ndiswrapper for Cards Without a Linux Driver
If you find your card does not have a Linux driver you will have to look at an app called ndiswrapper.
full information on ndiswrapper kept on this page including troubleshooting help specific to ndiswrapper.
3. Check Driver
If you ran lshw -C network and saw a driver bound to the device then let’s test to make sure it’s communicating with the kernel.
Run the command lsmod to see if driver is loaded. (look for the driver name that was listed in the output of lshw, «configuration» line).
If you did not see the driver module in the list then use the modprobe command to load it.
run the command sudo iwconfig. If you see output like in the example in the command section then the driver is at least identifying the device as a wireless device to the kernel.
Opening networking in system>administration> and seeing the device in the list is how to identify through a gui if the driver is at least communicating with the kernel.
run the command sudo iwlist scan to scan for a router. If an access point is identified this shows that the card is probably working properly as it can complete a wireless interface task. (note not all cards support scanning)
3.1. Multiple drivers loaded
For some cards (e.g., SMC2632W v1.02), an additional set of drivers is incorrectly loaded, effectively disabling wireless networking by generating two apparent wifi cards where there should only be one. Typically, you’ll see entries for both eth1 and wlan0_rename after running the iwconfig command, with your communication speed divided evenly between them. One of those drivers should not be loaded, and should be blacklisted. To do so, edit /etc/modprobe.d/blacklist and add the following lines:
where is, for example, «hostap» (the «hostap» driver apparently causes problems for several cards). Then save, reboot, and check your connection with iwconfig.
3.2. Driver looks ok, device disabled
Newer laptops come with battery saving features to disable the wireless radio. Usually this is switched by a FN+Fx key combo or a specific button for the purpose. It is possible the driver and connection is ok but the wireless device is disabled and can’t be used. Using the designated key(s) in linux sometimes does not work.
Options for identifying this:
rfkill list will show if there is a hardware or software block.
lshw command you see *-network:1 DISABLED or wireless=radio off
If you run the iwconfig command you see eth1 NOT READY!.
So how do you rectify this? It varies so much the exact solution can’t be put here in this document for all the different models. So.
Look at the LaptopTestingTeam page on the team wiki to see if your laptop is listed with any information.
Do a google search using terms such as manufacture, model, linux, wireless, enable, button, radio. etc. When searching and finding similar pages that don’t help, use words that are used in those pages to help you search.
Go to the ubuntu forums and ask, maybe someone else has the same laptop and knows the work around.
WifiDocs/WirelessTroubleShootingGuide/Drivers (последним исправлял пользователь knome 2013-12-13 18:55:41)
The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details
Источник
Checking Driver and Firmware Versions in Linux OS
This topic describes how to check the AVAGO 3508 RAID controller card driver and firmware versions in SLES 12 SP2.
Procedure
- Log in to the iBMC WebUI. For detail, see Logging In to the iBMC WebUI.
Mount the driver ISO file, for example, onboard_driver_sles12sp2.iso.
- On the toolbar of the remote virtual console, click .
The virtual DVD-ROM drive dialog box is displayed, as shown in Figure 8-6.
The Open dialog box is displayed.
When Connect changes to Disconnect (as shown in Figure 8-7), the virtual DVD-ROM drive is successfully connected to the server.
The following information is displayed:
The script checks whether the current hardware driver versions are compatible with each other and displays the check result.
- The script also checks the firmware version. If the firmware version is incompatible with the server, a warning message is displayed and the firmware download address is provided.
- For details about how to upgrade firmware, see HUAWEI Server Firmware Upgrade Guide.
- If yes, enter q to exit. No further action is required.
- If yes, press any key, and enter 1 to upgrade the driver.
After the driver is upgraded, enter 2 to check the compatibility again.
Источник