zhouwenchun

只为记住曾经走过的路!!! 有问题Q我:438637472 (发邮件,请加个备注)

Mac OS X常用命令

1.sw_vers查看系统版本号(在无法点击查看本机时可以使用命令查看系统版本号,曾遇到的问题 在虚拟机里面无法点击查看本机看系统版本号):

xiaqiangdeMacBook-Pro:~ xiaqiang$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.11.6
BuildVersion:   15G31

2.sw_vers | grep ‘ProductVersion:’ | grep -o ‘[0-9].[0-9].[0-9]*’ 直接过滤出版本号:

xiaqiangdeMacBook-Pro:~ xiaqiang$ sw_vers | grep 'ProductVersion:' | grep -o '[0-9]*\.[0-9]*\.[0-9]*'
10.11.6

3.sysctl machdep.cpu查看CPU信息和相关内核状态:

xiaqiangdeMacBook-Pro:~ xiaqiang$ sysctl machdep.cpu
machdep.cpu.max_basic: 20
machdep.cpu.max_ext: 2147483656
machdep.cpu.vendor: GenuineIntel
machdep.cpu.brand_string: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
machdep.cpu.family: 6
machdep.cpu.model: 61
machdep.cpu.extmodel: 3
machdep.cpu.extfamily: 0
machdep.cpu.stepping: 4
machdep.cpu.feature_bits: 9221959987971750911
machdep.cpu.leaf7_feature_bits: 35399595
machdep.cpu.extfeature_bits: 1241984796928
machdep.cpu.signature: 198356
machdep.cpu.brand: 0
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C
machdep.cpu.leaf7_features: SMEP ERMS RDWRFSGS TSC_THREAD_OFFSET BMI1 AVX2 BMI2 INVPCID SMAP RDSEED ADX IPT FPU_CSDS
machdep.cpu.extfeatures: SYSCALL XD 1GBPAGE EM64T LAHF LZCNT PREFETCHW RDTSCP TSCI
machdep.cpu.logical_per_package: 16
machdep.cpu.cores_per_package: 8
machdep.cpu.microcode_version: 33
machdep.cpu.processor_flag: 6
machdep.cpu.mwait.linesize_min: 64
machdep.cpu.mwait.linesize_max: 64
machdep.cpu.mwait.extensions: 3
machdep.cpu.mwait.sub_Cstates: 286531872
machdep.cpu.thermal.sensor: 1
machdep.cpu.thermal.dynamic_acceleration: 1
machdep.cpu.thermal.invariant_APIC_timer: 1
machdep.cpu.thermal.thresholds: 2
machdep.cpu.thermal.ACNT_MCNT: 1
machdep.cpu.thermal.core_power_limits: 1
machdep.cpu.thermal.fine_grain_clock_mod: 1
machdep.cpu.thermal.package_thermal_intr: 1
machdep.cpu.thermal.hardware_feedback: 0
machdep.cpu.thermal.energy_policy: 1
machdep.cpu.xsave.extended_state: 7 832 832 0
machdep.cpu.xsave.extended_state1: 1 0 0 0
machdep.cpu.arch_perf.version: 3
machdep.cpu.arch_perf.number: 4
machdep.cpu.arch_perf.width: 48
machdep.cpu.arch_perf.events_number: 7
machdep.cpu.arch_perf.events: 0
machdep.cpu.arch_perf.fixed_number: 3
machdep.cpu.arch_perf.fixed_width: 48
machdep.cpu.cache.linesize: 64
machdep.cpu.cache.L2_associativity: 8
machdep.cpu.cache.size: 256
machdep.cpu.tlb.inst.large: 8
machdep.cpu.tlb.data.small: 64
machdep.cpu.tlb.data.small_level1: 64
machdep.cpu.address_bits.physical: 39
machdep.cpu.address_bits.virtual: 48
machdep.cpu.core_count: 2
machdep.cpu.thread_count: 4
machdep.cpu.tsc_ccc.numerator: 0
machdep.cpu.tsc_ccc.denominator: 0

4.man sysctl查看相关命令的使用方法:

xiaqiangdeMacBook-Pro:~ xiaqiang$ man sysctl

   -o      Show opaque variables (which are normally suppressed).  The for-
             mat and length are printed, as well as a hex dump of the first
             sixteen bytes of the value.

     -q      Suppress some warnings generated by sysctl to standard error.

     -X      Equivalent to -x -a (for compatibility).

     -x      As -o, but prints a hex dump of the entire value instead of just
             the first few bytes.
阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_29284809/article/details/52386183
文章标签: Mac-OS-X 常用命令
个人分类: Mac OS X
上一篇最新安装cocoa pods错误提示
下一篇Mac OS X 分区相关操作
想对作者说点什么? 我来说一句

硬盘安装MAC OS X 方法

2011年10月25日 107KB 下载

MAC OS X 系统终端的常用命令

2015年09月26日 9KB 下载

最新版 iDSDT

2012年03月11日 4.58MB 下载

mac os x 重启补丁

2011年11月16日 17KB 下载

没有更多推荐了,返回首页

关闭
关闭