2019-03-15 03:46:41 +00:00
|
|
|
|
# system_profiler
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
> 报告系统硬件和软件配置。
|
2024-01-31 10:20:27 +00:00
|
|
|
|
> 更多信息:<https://keith.github.io/xcode-man-pages/system_profiler.8.html>.
|
2019-03-15 03:46:41 +00:00
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 显示可由 System Profiler.app 打开的完整系统资源报告:
|
2019-03-15 03:46:41 +00:00
|
|
|
|
|
|
|
|
|
`system_profiler -xml > MyReport.spx`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 显示硬件概述(型号、CPU、内存、串行等):
|
2019-03-15 03:46:41 +00:00
|
|
|
|
|
|
|
|
|
`system_profiler SPHardwareDataType`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 打印系统序列号:
|
2019-03-15 03:46:41 +00:00
|
|
|
|
|
|
|
|
|
`system_profiler SPHardwareDataType|grep "Serial Number (system)" |awk '{print $4}'`
|