操作系统与内核
uname -ahostnamectllsb_release -acat /etc/os-releaseuptime
fastfetchneofetchinxi -Fz
CPU
lscpu汇总了型号、核心数和特性;/proc/cpuinfo则包含每个核心的原始详细信息。当前 CPU 负载:使用top的批处理模式获取一次性数值,使用mpstat查看每个核心的统计信息,使用vmstat获取滚动视图。top-bn1 | grep"Cpu(s)"mpstat 15vmstat 1
内存
free -h回答了常见问题;/proc/meminfo包含所有详细数据。free -hcat /proc/meminfovmstat
在free命令中,请关注 "available"(可用)列,而非 "free"(空闲)列:Linux 会将闲置的 RAM 用作磁盘缓存,并在程序需要时释放。进程
使用ps获取快照,使用top或其更友好的替代品查看实时状态。ps auxps aux --sort=-%mem | headtophtopbtopatop
磁盘与分区
查看每个文件系统的可用空间、块设备树状结构以及分区表(fdisk/parted 需要 root 权限)。df -hduflsblk -ffdisk -lparted -l
硬件
按总线列出设备,或获取包含型号在内的完整硬件清单。lspcilsusblshw -shortdmidecode -t memory
温度和风扇转速(首次运行需先执行sensors-detect)。电池
upower报告详细的电池状态;acpi提供一行式的简洁答案。原始值存储在 /sys 中。acpi -bupower -i$(upower -e | grep BAT)cat /sys/class/power_supply/BAT*/capacity
蓝牙
bluetoothctl是当前推荐工具;hciconfig已弃用,但在旧系统上仍可能找到。bluetoothctl showbluetoothctl deviceshciconfig -a
网络接口
内核与启动信息
dmesg打印内核环形缓冲区(在大多数发行版上需要 root 权限);journalctl -b显示自本次启动以来的所有日志记录。dmesgdmesg -wjournalctl -blsmod