Display Hardware Specifications using Terminal Emulator: Graphic Cards
Linux is a powerful and versatile operating system that provides various tools to display hardware specifications. In this article, we will focus on displaying the characteristics of a graphic card using the terminal emulator. Specifically, we will use the lspci command with some additional parameters to extract the necessary information. By the end of this article, you will be able to understand how to display the form and name of your graphic card using just two commands.
The lspci Command
lspci is a command-line tool that is used to display information about all the PCI (Peripheral Component Interconnect) buses in your system. The PCI bus is a system that allows different components of a computer, such as the CPU, memory, and expansion cards, to communicate with each other. By using the lspci command, you can see a list of all the devices that are connected to the PCI bus, including the graphic card.
Displaying Graphic Card Information
To display the characteristics of your graphic card, you can use the following two commands:
$ lspci -nn | grep VGA
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti]
[10de:1c82] (rev a1)
$ lspci -nnkd::300
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] [10de:1c82] (rev a1)
Subsystem: Micro-Star International Co., Ltd. [MSI] GP107 [GeForce GTX 1050 Ti] [1462:11bf]
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR-
The first command, lspci -nn | grep VGA, filters the output of the lspci command to only show the lines that contain the string "VGA". This is useful because the graphic card is typically identified as a VGA compatible controller. The output of this command will show the name of the graphic card and its vendor ID and device ID in the format "VendorID:DeviceID".
The second command, lspci -nnkd::300, displays detailed information about the graphic card, including its memory regions, I/O ports, interrupts, and capabilities. The "-nn" option displays the vendor and device ID in hexadecimal format, and the "-k" option displays the kernel driver in use. The "d::300" option filters the output to only show devices with a class code of 0300, which corresponds to VGA compatible controllers. This command provides a lot of information about the graphic card, including its memory map, I/O ports, interrupts, and capabilities.
In this article, we have shown you how to display the characteristics of your graphic card using the terminal emulator in Linux. By using the lspci command with some additional parameters, you can extract detailed information about your graphic card, including its name, vendor ID, device ID, memory regions, I/O ports, interrupts, and capabilities. This information can be useful for troubleshooting issues with your graphic card or for optimizing its performance.
References
Types of references included: online resources.