查看 CPU 型号
sysctl machdep.cpu.brand_string
查看系统相关信息
➜ system_profiler -listDataTypes
Available Datatypes:
SPParallelATADataType
SPUniversalAccessDataType
SPSecureElementDataType
SPApplicationsDataType
SPAudioDataType
SPBluetoothDataType
SPCameraDataType
SPCardReaderDataType
SPComponentDataType
SPiBridgeDataType
SPDeveloperToolsDataType
SPDiagnosticsDataType
SPDisabledSoftwareDataType
SPDiscBurningDataType
SPEthernetDataType
SPExtensionsDataType
SPFibreChannelDataType
SPFireWireDataType
SPFirewallDataType
SPFontsDataType
SPFrameworksDataType
SPDisplaysDataType
SPHardwareDataType
SPHardwareRAIDDataType
SPInstallHistoryDataType
SPLegacySoftwareDataType
SPNetworkLocationDataType
SPLogsDataType
SPManagedClientDataType
SPMemoryDataType
SPNVMeDataType
SPNetworkDataType
SPPCIDataType
SPParallelSCSIDataType
SPPowerDataType
SPPrefPaneDataType
SPPrintersSoftwareDataType
SPPrintersDataType
SPConfigurationProfileDataType
SPRawCameraDataType
SPSASDataType
SPSerialATADataType
SPSPIDataType
SPSmartCardsDataType
SPSoftwareDataType
SPStartupItemDataType
SPStorageDataType
SPSyncServicesDataType
SPThunderboltDataType
SPUSBDataType
SPNetworkVolumeDataType
SPWWANDataType
SPAirPortDataType
查看对应信息,比如查看硬件概述
➜ system_profiler SPHardwareDataType
Hardware:
Hardware Overview:
Model Name: MacBook Air
Model Identifier: MacBookAir7,2
Processor Name: Intel Core i7
Processor Speed: 2.2 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache (per Core): 256 KB
L3 Cache: 4 MB
Memory: 8 GB
Boot ROM Version: 184.0.0.0.0
SMC Version (system): 2.27f2
Serial Number (system): FVFW5047J1WV
Hardware UUID: 61763F2C-47F2-580E-9E02-409384172D75
查看有线网络信息
➜ system_profiler SPEthernetDataType
Ethernet Cards:
USB 10/100 LAN:
Type: USB
BSD name: en3
Kext name: AppleUSBECM.kext
Location: /System/Library/Extensions/AppleUSBECM.kext
Version: 5.0.0
MAC Address: 9c:eb:e8:b0:a6:ff
Product ID: 17
Vendor ID: 10007
USB:
Type: USB
BSD name: en4
Kext name: AppleUSBNCM.kext
Location: /System/Library/Extensions/AppleUSBNCM.kext
Version: 5.0.0
MAC Address: de:56:e7:af:d6:89
Product ID: 4776
Vendor ID: 1452
查看应用信息
system_profiler SPApplicationsDataType
生成 XML 报告
➜ system_profiler -xml SPEthernetDataType SPFirewallDataType > ~/Desktop/system_profile-EthernetFirewall.xml
更多使用查看帮助
➜ system_profiler -h