← 返回命令列表

Linux command

lscpu 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Example

lscpu

Example

lscpu -e

Example

lscpu -e -b

Example

lscpu -e -c

Example

lscpu -C

Example

lscpu -J

说明

lscpu displays information about the CPU architecture gathered from /proc/cpuinfo and sysfs. It shows CPU model, cores, threads, caches, NUMA nodes, and CPU flags.

参数

-e, --extended
Display information in extended (table) format
-b, --online
Limit display to online CPUs (with -e)
-c, --offline
Limit display to offline CPUs (with -e)
-C, --caches
Display details about CPU caches
-J, --json
Output in JSON format
-p, --parse
Optimize output for parsing
-x, --hex
Use hexadecimal masks for CPU sets
-y, --physical
Print physical IDs instead of logical
-s, --sysroot dir
Use specified directory as system root

FAQ

What is the lscpu command used for?

lscpu displays information about the CPU architecture gathered from /proc/cpuinfo and sysfs. It shows CPU model, cores, threads, caches, NUMA nodes, and CPU flags.

How do I run a basic lscpu example?

Run `lscpu` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -e, --extended do in lscpu?

Display information in extended (table) format