Understanding the specific hardware components within the Linux system is crucial for troubleshooting, upgrading, or simply gaining insights into the computer's capabilities. Among these components, the motherboard stands as a foundational element, orchestrating the communication and interaction between various hardware units. This tutorial explains how to get motherboard name on Linux.
Run the following command in the terminal to get motherboard name:
sudo dmidecode -t 2 | awk -F': ' '/Product Name/{print $2}'
Output example:
MEG Z790 ACE (MS-7D86)
Let's break down the command step by step:
dmidecode
- is a command line utility on Linux that reads the system DMI (Desktop Management Interface) data to display hardware-related information about the system.-t 2
- displays information from the "Baseboard" (type 2) DMI table. The baseboard DMI table typically contains information about the motherboard.awk
- is a pattern scanning and processing tool.-F': '
- sets the field separator for theawk
to colon and space./Product Name/
- is a pattern to search for lines containingProduct Name
.{print $2}
- if the pattern is matched, this action prints the second field (after the field separator) of that line, which is the name of the motherboard.
Leave a Comment
Cancel reply