Recognize hardware in Ubuntu

ubuntu logo

One of the sections that causes the most difficulties for new users of Linux in general and Ubuntu in particular, is the recognition of devices in the system when they have not been detected automatically. As you may already know, the detection of the hardware of the equipment, contrary to what happens in Windows systems, is carried out by the kernel at the time of system startup, and there is also the possibility of later recognizing other devices that are hot-connected.

This little guide aims to enlighten you a bit in the common tasks to recognize hardware in Ubuntu, where we will talk about the most common elements: CPU, memory and storage among others.

On many occasions the problem it does not lie in how to look if not what, since the drivers of the hardware elements of a computer in Unix systems vary slightly to how it is done in Windows environments (the Windows kernel relies mainly on the drivers to support the various system components, while on Linux it is the kernel that supports most of the devices).

Without being able to reach all kinds of devices and hardware components that may exist in a computer (since that would be a huge task), we want to collect those principales that any computer can have and that are not automatically detected by the system. These steps can be considered essential in many cases in order to later find the necessary drivers and add them to the system.

General list of equipment hardware

In general, using the following command we can get an overview of all detected hardware in our team.

 $ sudo lshw 

How will you see the list that is generates is very extensive and detailed, so it is convenient to dump it to a file or to concatenate a more function to read it more calmly.

Recognizing the processor

The processor is one of the fundamental components of a computer, along with memory and input and output devices. A system file and a simple command can help identify what type of processor is being recognized in our environment. This component is supported within the kernel, so if there were a problem because all the capabilities of our processor were not recognized, we would need a kernel (or a distribution) that supports it.

The file located inside / proc / cpuinfo It will give us detailed information about the recognition of our CPU:


And through the command lscpu, which does not require any more modifiers, we can obtain data from the CPU in a friendly way:


Recognizing memory

Memory constitutes another of the essential elements within the system. Good management of it as the option to take advantage of all its capabilities ensure the proper functioning of the operating system and optimal performance. To obtain technical data of the same we must resort to the general command on system hardware that we indicated at the beginning, remember, etc.

computer memory screenshot

There are also another series of commands that allow us to obtain general information on the amount of memory and its dentin within the operating system, which can give us enough information to determine whether the modules installed in the equipment are being correctly detected or not. details of how it is being recognized within the operating environment. As an example, the top commands (to determine the total amount and that which is swapped), vmstat -SM -a (for details on

Recognizing hard drives

The following command well known to all, Fdisk, our list the storage devices detected on our computer.

 $ sudo fdisk -l

fdisk -l

But what if we just plugged in a new SATA or SCSI drive and the system doesn't detect it? This is something very common if you use hot plug SATA drives (verify that the option of hot-swap in the BIOS of the computer or, otherwise, it will work as a normal IDE disk and you will have to restart the computer for it to be detected by the system) or virtual machines, where it is possible to add SCSI type disks that are not automatically recognized by the computer.

If this is your case, you will have to force a rescue of the controller. To do this, enter the following command:

 $ grep mpt /sys/class/scsi_host/host?/proc_name

This command will return a line of the type: / sys / class / scsi_host /hostX/ proc_name: mptspi (where hostX is the field that interests us). Next, enter the following command to force the rescan:

echo "- - -" > /sys/class/scsi_host/hostX/scan

Recognizing the graphics card

If you remember that we mentioned at the beginning of the article that the Linux kernel gave the management of certain devices to the installed drivers of the computer, the case of graphics cards is one of those devices whose management is inherited. That is why the command that will help us in this case is:

lspci | grep VGA

And it will give us controller information the system is using in the team.

lspci vga

With this information it is a question of verifying if we are using the correct driver within our system or should we use some other more specific or evolved one.

Recognizing USB devices

In this case we have a specific command for these types of devices:


Your output will provide us with information about the connected USB devices as follows:


To restart the USB devices, we can schedule a cronjob with the following command so that it updates the status of the devices every minute:

* * * * *    lsusb -v 2>&1 1>/dev/null

We hope that this little guide will be of use to you for most of your system devices. Definitely there are many more commands in linux and applications to download for other information.

Have you found any other useful command in your work with the Ubuntu system to detect hardware?

Leave a Comment

Your email address will not be published. Required fields are marked with *



  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   notesubuntublog said

    An excellent article has helped me to document myself and apply myself to certain setbacks that I have had in the past.

    Thank you,
    Hugo Gonzalez
    Cc's. Venezuela

  2.   ixoye64 said

    Thanks, at least to me this article has served me a lot, greetings

  3.   jcp said

    and for network cards

  4.   julian said

    and for network cards?

  5.   jorg3 said

    How can I recognize the bluetooth of a computer that did not recognize it automatically when I installed ubuntu 18.0 to it? Laptop Model: Dell Vostro 1400

  6.   javierch said

    Excellent friend, thank you very much, they are very precise commands, I found information that I did not know how to obtain.