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
+11.8k Golang : Convert(cast) uintptr to string example
+5.9k How to let Facebook Login button redirect to a particular URL ?
+5.3k PHP : Proper way to get UTF-8 character or string length
+18.2k Golang : Delete item from slice based on index/key position
+6.3k Golang : alternative to os.Exit() function
+7k Swift : Convert (cast) String to Float
+9.1k Android Studio : Simple input textbox and intercept key example
+13.2k Golang : Find network of an IP address
+10.2k Golang : Format numbers to nearest thousands such as kilos millions billions and trillions
+48.9k Golang : Disable security check for HTTPS(SSL) with bad or expired certificate
+12.7k Golang : convert rune to unicode hexadecimal value and back to rune character
+11.6k Golang : Transform comma separated string to slice example