Skip to content

lscpu

Inspect Linux CPU architecture, topology, virtualization support, NUMA layout, and cache details using the lscpu command


cpu architecture details

lscpu

See if our cpu supports VT-x

lscpu |grep Virtualization

Display information about the CPU

lscpu | egrep 'Model name|Socket|Thread|NUMA|CPU\(s\)'

Display sizes in bytes

lscpu --bytes

Display CPU information in human-readable format:

lscpu -e

Display CPU information in parsable format:

lscpu -p

Display both online and offline CPUs

lscpu --all -e

Display only online cpu´s

lscpu --online -e

Display only offline CPUs:

lscpu --offline -e

Display CPU information in JSON format

lscpu --json

Display information about caches

lscpu --caches

Use hexadecimal masks

lscpu --hex

Read CPU information from a directory

lscpu --sysroot /
lscpu --output-all -e

Save lscpu output to a text file

lscpu > cpu_info.txt