lscpu
lscpu reports information about the CPU, such as its architecture, vendor identification, virtualization features, cache (L1/L2/L3), and CPU vulnerabilities.Installation
When lscpu is not installed by default, it can be added to the system using the relevant software package.
Package information for lscpu
Operating system | Package name | Installation |
---|---|---|
AlmaLinux | util-linux |
|
Arch Linux | util-linux |
|
Debian | util-linux |
|
Fedora | util-linux |
|
Red Hat Enterprise Linux | util-linux |
|
Rocky Linux | util-linux |
|
Ubuntu | util-linux |
|
Your Linux distribution using a different package? Share your feedback.
Usage
Available options
Short option | Long option | Description |
---|---|---|
-a | --all | Show online and offline CPUs when used together with -e or -p |
-B | --bytes | Use bytes instead of human-readable format |
-b | online | Only online CPUs, to be used with -e or -p |
-C | --caches[=list] | CPU cache information. List is optional, and can be used for column selection |
-c | --offline | Only offline CPUs, to be used with -e or -p |
-h | --help | Show help |
-J | --json | JSON output |
-p | --parse[=list] | Tune output for easier parsing. List is optional, and can be used for column selection |
-s | --sysroot directory | Inspect another Linux instance instead of the active system |
-x | --hex | Use hexadecimal masks |
-y | --physical | Show physical IDs, which are platform-specific and provided by the kernel. |
-v | --version | Show lscpu version |
--output-all | Show all available column, to be combined with --extended (-e), --parse (-p), or --caches (-C) |
Missing an option in this overview? Share your feedback.
Relevant articles using the lscpu command
The following articles include an example on how to use lscpu and might be worth further exploring.