Mac/Linux/Windows : Get CPU information from command line
Writing these down here for future references, will be handy with comes to identifying a machine's CPU information during system maintenance time. Below are the command line tools to get the CPU information in Windows, Mac OS X and Linux.
Linux:
$cat /proc/cpuinfo
Mac OS X:
$sysctl -n machdep.cpu.brand_string
Windows 8 and above:
C:>wmic cpu full /format:list
NOTE: For Windows, without the /format:list
... the output result will be almost impossible to read. You can choose to use /format:htable
for HTML, /format:csv
for csv format or /format:xml
for xml format as well.
References:
https://adamscheller.com/systems-administration/find-cpu-model-linux/
http://osxdaily.com/2011/07/15/get-cpu-info-via-command-line-in-mac-os-x/
http://www.pearsonitcertification.com/articles/article.aspx?p=1700427&seqNum=4
See also : Golang : Get hardware information such as disk, memory and CPU usage
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+14k Golang : Convert spaces to tabs and back to spaces example
+12.7k Linux : How to install driver for 600Mbps Dual Band Wifi USB Adapter
+18.1k Golang : Simple client server example
+4.4k Golang : Converting individual Jawi alphabet to Rumi(Romanized) alphabet example
+6.5k Golang : Calculate US Dollar Index (DXY)
+7.3k Nginx : How to block user agent ?
+6k AWS S3 : Prevent Hotlinking policy
+5.5k Golang : Intercept, inject and replay HTTP traffics from web server
+14.1k Golang : Get current time
+5.6k Golang : Display advertisement images or strings on random order
+10.8k Golang : Select region of interest with mouse click and crop from image
+22.2k Golang : Use TLS version 1.2 and enforce server security configuration over client