lscpu
system informationLinux
The lscpu command is one of the most frequently used commands in Linux/Unix-like operating systems. lscpu Display information about the CPU architecture
Quick Reference
Command Name:
lscpu
Category:
system information
Platform:
Linux
Basic Usage:
lscpu [options] [arguments]
Common Use Cases
Syntax
lscpu [options]
Options
Option | Description |
---|---|
-a, --all |
Print both online and offline CPUs |
-b, --online |
Print online CPUs only |
-c, --offline |
Print offline CPUs only |
-e, --extended[=list] |
Print a table of available CPUs |
-p, --parse[=list] |
Print in parsable format |
-s, --sysroot directory |
Use specified directory as system root |
-x, --hex |
Print CPU masks in hexadecimal format |
-y, --physical |
Print physical instead of logical IDs |
-C, --caches[=list] |
Display cache information in a table |
-J, --json |
Use JSON output format |
-h, --help |
Display help information |
-V, --version |
Display version information |
Examples
How to Use These Examples
The examples below show common ways to use the lscpu
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
lscpu