Software & Apps Linux 172 172 people found this article helpful How to Use Linux to Find the Names of the Devices on Your Computer Try these commands to show devices on your computer by Gary Newell Writer Gary Newell was a freelance contributor, application developer, and software tester with 20+ years in IT, working on Linux, UNIX, and Windows. our editorial process Gary Newell Updated on May 29, 2020 reviewed by Chris Selph Lifewire Tech Review Board Member Chris Selph is a CompTIA-certified technology and vocational IT teacher. He also serves as network & server administrator and performs computer maintenance and repair for numerous clients. our review board Article reviewed on May 08, 2020 Chris Selph Linux Switching from Windows Tweet Share Email Listing the devices, drives, PCI devices, and USB devices on your computer involves a series of commands easily invoked from a shell prompt in Linux. Use the 'mount' Command The most simple syntax you can use is as follows: mount The output from the above command is fairly verbose and will be something like this: Hard drives generally start with /dev/sda or /dev/sdb, so use the grep command to reduce the output as follows: mount | grep /dev/sd The results show something like this: /dev/sda4 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro) This doesn't list your drives but it does list your mounted partitions. It doesn't list partitions that aren't yet mounted. The device /dev/sda usually stands for the first hard drive on your system, and if you have a second hard drive, then it will be mounted to /dev/sdb. If you have an SSD, then this will likely be mapped to /dev/sda and the hard drive mapped to /dev/sdb. Use 'lsblk' to List Block Devices Mount is fine for listing mounted devices, but it doesn't show every device you have, and the output is verbose, making it difficult to read. The best way to list the drives in Linux is to use lsblk as follows: lsblk The information displays in a tree format with the following information: NameMajor Minor device numberIs it removableSizeIs it read-onlyIs it a disk or a partitionWhere is the partition mounted The display looks something like this: The information is easier to read. It displays one drive called sda, which offers 50 G of storage. It splits into one partition, called sda1. The drives fd0 (floppy) and sr0 (CD-ROM) appear in this listing. The particular machine this listing drew from, called mint-vm, is a Linux Mint virtual machine running in the Hyper-V system on a Windows 10 computer. Hyper-V provisions a virtual floppy and CD-ROM drive by default. How to List PCI Devices To list the PCI devices use the lspci command as follows: lspci The output from the above command is verbose, meaning you probably get more information than you need. Here's a short snapshot as an example: The listing lists devices, including VGA controllers, USB controllers, sound, Bluetooth, wireless, and Ethernet controllers. The standard lspci listing is considered basic, and if you want more detailed information about each device, run the following command: lspci -v The information for each device looks something like this: 02:00.0 Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter (rev 01)Subsystem: Dell AR9485 Wireless Network AdapterFlags: bus master, fast devsel, latency 0, IRQ 17Memory at c0500000 (64-bit, non-prefetchable) [size=512K]Expansion ROM at c0580000 [disabled] [size=64K]Capabilities:Kernel driver in use: ath9kKernel modules: ath9k The output from the lspci -v command is more readable. You can get even more verbose output by using the following command: lspci -vv If that isn't enough information, try the following: lspci -vvv The most useful aspect of lspci, other than listing devices, is the kernel driver used for that device. If the device isn't working, it is worth researching whether there is a better driver available for the device. List the USB Devices Attached to the Computer To list the USB devices available for your computer, use the following command: lsusb The output will be something like this: Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching HubBus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 001 Device 005: ID 0c45:64ad MicrodiaBus 001 Device 004: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader ControllerBus 001 Device 007: ID 0cf3:e004 Atheros Communications, Inc.Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching HubBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 004 Device 002: ID 0bc2:231a Seagate RSS LLCBus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hubBus 003 Device 002: ID 054c:05a8 Sony Corp.Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub If you insert a USB device into the computer, such as an external hard drive, and then run the lsusb command, the device appears on the list. Summary The best way to list anything in Linux is to remember the following ls commands: ls: List files in the file system.lsblk: List block devices (for example, the drives).lspci: List PCI devices.lsusb: List USB devices.lsdev: List all devices.