In this tutorial, we will guide you through the process of how to display the notebook model number using the Ubuntu command line. This can be particularly useful when you need to find specific hardware or software compatible with your machine.
To display the notebook model number in Ubuntu command line, you can use the
dmidecode command. There are multiple methods to achieve this, including displaying the version number, SKU number, or detailed system information.
Before we begin, ensure that you have access to a terminal window. You can open a terminal by pressing
Introduction to dmidecode
The primary tool we will be using is
dmidecode. It is a command on Unix-like operating systems that can retrieve and decode hardware information from the system’s BIOS (Basic Input/Output System). This includes details such as the system’s manufacturer, version, serial numbers, and more.
If you don’t already have
dmidecode installed, you can do so by running the following command:
sudo apt-get install dmidecode
Displaying the Notebook Model Number
dmidecode is installed, you can use it to display the model number of your notebook. There are a few different ways to do this:
Method 1: Displaying the Version Number
Open your terminal and type the following command:
sudo dmidecode | grep Version | sed -n '2p'
This command will display the version number of your notebook. Here’s what each part of the command does:
sudo dmidecode: This runs the
dmidecodecommand as a superuser, which is necessary because accessing the BIOS requires administrative privileges.
| grep Version: This pipes (
|) the output of the previous command into
grep, which searches for the word “Version”.
sed -n '2p': This uses the
sedcommand to print (
p) the second (
2) line of the output. This is because the first line of the
dmidecodeoutput that contains “Version” is typically not the one we’re interested in.
Method 2: Displaying the SKU Number
Alternatively, you can display the SKU number of your notebook. To do this, type the following command into your terminal:
sudo dmidecode | grep 'SKU Number' | head -1
This command works similarly to the previous one, but it searches for “SKU Number” instead of “Version” and prints the first line of the output.
Method 3: Displaying Detailed System Information
For a more detailed view of your system information, you can use the following command:
sudo dmidecode | grep -A 9 "System Information"
This command will display the “System Information” section of the
dmidecode output, which includes the notebook model number along with other information.
You can also use
sudo dmidecode | less to view the entire
dmidecode output and navigate to the “System Information” section using the
In this tutorial, we’ve shown you how to display your notebook model number using the Ubuntu command line. We hope you find this information useful for your software or hardware compatibility needs. If you have any questions or need further assistance, feel free to leave a comment below.
To open a terminal in Ubuntu, press
T on your keyboard.
dmidecode is a command-line tool that retrieves and decodes hardware information from the system’s BIOS. You need it to display detailed system information, including the notebook model number.
You can install
dmidecode by running the command
sudo apt-get install dmidecode in the terminal.
There are a few different methods you can use. Method 1:
sudo dmidecode | grep Version | sed -n '2p'. Method 2:
sudo dmidecode | grep 'SKU Number' | head -1. Method 3:
sudo dmidecode | grep -A 9 "System Information".
Yes, you can view the entire
dmidecode output by running the command
sudo dmidecode | less in the terminal. Use the
↓ key to navigate to the "System Information" section.