How to use lspci, lsscsi, lsusb, and lsblk to get Linux system devices information
There are many utilities available to check Linux system hardware information. Some commands report altogether like CPU, Processor, memory, storage, disk, etc,. and the rest will cover only specific hardware components like CPU or processor or memory, etc,.
In this tutorial we are going to cover about Linux System Devices Information utilities such as lspci, lsscsi, lsusb, and lsblk.
lspci:List PCI Bus Deviceslsscsi:List scsi Deviceslsusb:List USB buses and devicelsblk:List block devices
This tutorial takes a quick look at some of the most commonly used commands to check information and configuration details about various hardware devices.
1) What’s lspci – List PCI Bus Devices
lspci stands for list PCI devices. lspci command is used to display information about PCI buses in the system and hardware devices that are connected to PCI and PCI bus.
It will display information about model number/chip details for devices like PCI bridge, VGA controller, Ethernet controller, USB controller, Audio device, IDE interface, etc,.,
lspci doesn’t come stand alone utility and its part of the pciutils package.
By default, it shows a brief list of devices which are attached in the system, so filter out specific device information with grep for better view.
How to install lspci
pciutils is available in distribution official repository so, we can easily install through distribution package manager.
For Debian/Ubuntu, use apt-get command or apt command to install pciutils.
$ sudo apt install pciutils
For RHEL/CentOS, use YUM Command to install pciutils.
$ sudo yum install pciutils
For Fedora, use dnf command to install pciutils.
$ sudo dnf install pciutils
For Arch Linux, use pacman command to install pciutils.
$ sudo pacman -S pciutils
For openSUSE, use Zypper Command to install pciutils.
$ sudo pacman -S pciutils
lspci Usage
Just run the following command to get the PCI device information.
# lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:02.0 VGA compatible controller: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter
00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
00:04.0 System peripheral: InnoTek Systemberatung GmbH VirtualBox Guest Service
00:05.0 Multimedia audio controller: Intel Corporation 82801AA AC'97 Audio Controller (rev 01)
00:06.0 USB controller: Apple Inc. KeyLargo/Intrepid USB
00:07.0 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:0b.0 USB controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller
00:0d.0 SATA controller: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] (rev 02)
To display the detailed information of all the PCI devices
# lspci -v
To display the subsystem information.
# lspci -m
2) What’s lsscsi – List scsi Devices
lsscsi stands for list small Computer System Interface. The lsscsi command lists information about SCSI/Sata devices attached to the system.
It scans the sysfs (mounted at /sys) pseudo file system to gather information, which was introduced in the 2.6 Linux kernel series.
How to install lsscsi
lsscsi is available in distribution official repository so, we can easily install through distribution package manager.
For Debian/Ubuntu, use apt-get command or apt command to install lsscsi.
$ sudo apt install lsscsi
For RHEL/CentOS, use YUM command to install lsscsi.
$ sudo yum install lsscsi
For Fedora, use dnf command to install lsscsi.
$ sudo dnf install lsscsi
For Arch Linux, use pacman command to install lsscsi.
$ sudo pacman -S lsscsi
For openSUSE, use Zypper Command to install lsscsi.
$ sudo pacman -S lsscsi
lspci Usage
Just run the following command to get the SCSI device information.
# lsscsi
[0:2:0:0] disk IBM ServeRAID M5110e 3.24 /dev/sda
[0:2:1:0] disk IBM ServeRAID M5110e 3.24 /dev/sdb
[2:0:0:0] cd/dvd IBM SATA DEVICE 62F2642 SA82 /dev/sr0
3) What’s lsusb – List USB buses and device
lsusb stands for list Universal Serial Bus or USB. It’s display information about USB buses in the system and the devices connected to them. This will display a list of all USB devices connected to your computer such as keyboards, mouse, printers, disk drives, network adapters, etc.,.
lsusb doesn’t come stand alone utility and its part of the usbutils package.
How to install lsusb
lsusb is available in distribution official repository so, we can easily install through distribution package manager.
For Debian/Ubuntu, use apt-get command or apt command to install lsusb.
$ sudo apt install usbutils
For RHEL/CentOS, use YUM command to install lsusb.
$ sudo yum install usbutils
For Fedora, use dnf command to install lsusb.
$ sudo dnf install usbutils
For Arch Linux, use pacman command to install lsusb.
$ sudo pacman -S usbutils
For openSUSE, use Zypper Command to install lsusb.
$ sudo pacman -S usbutils
lsusb Usage
Just run the following command to get the USB device information.
# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 003: ID ffff:0248
Bus 002 Device 005: ID 04b3:4010 IBM Corp.
Details:
Bus 002:Which bus the device is attachedDevice 005:It’s attached as fifth deviceID 04b3:4010:It’s device identification numberIBM Corp:Manufacture Name
4) What’s lsblk – List block devices
lsblk stands for list block devices. It’s display information about block devices (except RAM disks). Block devices are hard disk partition, flash drives, CD-ROM, optical drives, etc,.
lsblk is part of the util-linux package. It’s collection of basic system utilities that contains a large variety of low-level system utilities that are necessary for a Linux system to function.
How to install lsblk
lsblk is available in distribution official repository so, we can easily install through distribution package manager.
For Debian/Ubuntu, use apt-get command or apt command to install lsblk.
$ sudo apt install util-linux
For RHEL/CentOS, use YUM command to install lsblk.
$ sudo yum install util-linux-ng
For Fedora, use dnf command to install lsblk.
$ sudo dnf install util-linux-ng
For Arch Linux, use pacman command to install lsblk.
$ sudo pacman -S util-linux
For openSUSE, use Zypper Command to install lsblk.
$ sudo zypper util-linux
lsblk Usage
Just run the following command to get the block device information.
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 81.4M 1 loop /snap/core/2898
loop1 7:1 0 8.4M 1 loop /snap/gping/13
sda 8:0 0 30G 0 disk
└─sda1 8:1 0 30G 0 part /
sr0 11:0 1 1024M 0 rom
Details:
NAME:Device Name listed hereMAJ:MIN:Shows major and minor device numberRM:Shows whether the device is removable or notSIZE:Dispaly size of the deviceRO:Display if the device is read-onlyTYPE:Display about device type such as disk, partition, lvm, etc.,MOUNTPOINT:Dispaly where the device is mounted
To List Device Permissions and Owner information.
# lsblk -m
转载自:
https://www.2daygeek.com/check-system-hardware-devices-bus-information-lspci-lsscsi-lsusb-lsblk-linux/
How to use lspci, lsscsi, lsusb, and lsblk to get Linux system devices information的更多相关文章
- Linux中什么是块设备 及 lsblk命令的使用
Linux中I/O设备分为两类:字符设备和块设备.两种设备本身没有严格限制,但是,基于不同的功能进行了分类.(1)字符设备:提供连续的数据流,应用程序可以顺序读取,通常不支持随机存取.相反,此类设备支 ...
- lsblk df
df(1) - Linux manual page http://man7.org/linux/man-pages/man1/df.1.html report file system disk spa ...
- Linux中显示系统中USB信息的lsusb命令
来源:Linux中国 原文:https://linux.cn/article-2448-1.html 通用串行总线(USB)被设计成为连接计算机外设的标准,如键盘.鼠标.打印机.数码相机.便携式媒体 ...
- linux磁盘之lsblk命令
lsblk命令可以显示很多跟磁盘相关分区.所属关系以及lvm的重要信息,所以这个命令最好掌握.lsblk命令默认情况下将以树状列出所有块设备,包括查看磁盘挂载信息.lsblk命令包含在util-lin ...
- BASH 进阶(转载防丢)
基础 学习 Bash 的基础知识.具体来说,输入 man bash 并至少全文浏览一遍; 它很简单并且不长.其他的 shell 可能很好用,但 Bash 功能强大且几乎所有情况下都是可用的 ( 只学习 ...
- Linux显示历史记录
Linux显示历史记录 youhaidong@youhaidong-ThinkPad-Edge-E545:~$ history 1 uname -a 2 lsusb 3 df -h 4 ps -A 5 ...
- Mac命令行
参考:http://www.cnblogs.com/-ios/p/4949923.html 必读 涵盖范围: 这篇文章对刚接触命令行的新手以及具有命令行使用经验的人都有用处.本文致力于做到覆盖面广(尽 ...
- linux 命令中英文对照,收集
linux 命令中英文对照,收集 linux 命令英文全文 Is Linux CLI case-sensitive? The answer is, yes. If you try to run L ...
- Linux操作系统内核编译之NTFS文件系统模块支持案例
Linux操作系统内核编译之NTFS文件系统模块支持案例 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.内核编译概述 单内核体系设计.但充分借鉴了微内核设计体系的优点,为内核引 ...
- Linux操作系统(第二版)(RHEL 8/CentOS 8)
Linux操作系统(第二版)(RHEL 8/CentOS 8) http://www.tup.tsinghua.edu.cn/booksCenter/book_08172501.html Linux操 ...
随机推荐
- .NET CORE-IIS发布.netcore项目时报错:HTTP错误500.19-Internal Server Error
最近IIS发布Core3.1项目的时候遇到下面问题,发现是缺少ASP.NET Core Runtime 解决方法:安装.netcore host 版本
- C语言中局部变量和全局变量关于释放
1.全局都属于静态,局部区分静态非静态,局部静态和全局的区别在于可见范围,局部能使用外部看不见的意思,本质相同的. 2.如果是全局变量或局部静态变量,编译器会为其分配一个位于静态存储区的地址.这个地址 ...
- Django Rest Framework中文文档:Serializer relations
这是对DRF官方文档:Serializer relations的翻译,根据个人的理解对内容做了些补充.修改和整理. 一,django模型间的关系 在我们对数据进行建模时,最重要的一点就是根据功能需求分 ...
- 修改docker0 中的inet
由于在服务器使用默认的172开头的ip,可能会跟别人的产生冲突,则就需要重新配置ip 1.创建daemon.json vi /etc/docker/daemon.json (不能打空格:用tab缩进) ...
- Java-集合概要
集合概要 Java集合类存放于 java.util 包中,是一个用来存放对象的容器. 集合的两个主要接口是 Collection接口 和 Map 接口. 图片来源:菜鸟教程 集合的优点 区别 集合 数 ...
- 一、100ASK_IMX6ULL嵌入式裸板学习_LED实验(知识点补充)
知识点补充: Linux进程中的五个段 BSS段(Block Started bySymbol,意为"以符号开始的块"): BSS,是Unix链接器产生的未初始化数据段.通常是 ...
- OS复盘
OS复盘 OS课设已经结课一段时间了,我也从其他课程中抽身出来,有了一段能够好好反思的时光. 说实话,完成OS课设的过程是很痛苦的,指导书蜻蜓点水.注释模棱两可.各种函数和文件调用杂乱无章.每次在完成 ...
- 19JS输出杨辉三角
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF ...
- flutter tabbar指示器indicator宽度高度自定义
在tabbar中indicator宽度是无法修改的,所以需要咱们去自定义indicator. 下面是自定义的代码,直接拷贝使用,已做好修改. // Copyright 2018 The Chromiu ...
- K8S-pod详解
目录: namespace六大类型 Pod基础概念 Pod两种使用方式 通常把Pod分为两类 Pod容器的分类 init的容器作用 镜像拉取策略(image PullPOlicy) 部署harbor创 ...