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
+4.9k Get website traffic ranking with Similar Web or Alexa
+6.2k Golang : Use modern ciphers only in secure connection
+7.4k Golang : Implementing class(object-oriented programming style)
+9.5k Swift : Convert (cast) String to Integer
+9.7k Golang : Create Temporary File
+7.7k Golang : Accept any number of function arguments with three dots(...)
+4.6k Golang : ROT32768 (rotate by 0x80) UTF-8 strings example
+19.8k Golang : For loop continue,break and range
+7.3k Golang : How to check variable or object type during runtime?
+4.2k Golang : Get FX sentiment from website example
+11.8k Golang : Convert IPv4 address to packed 32-bit binary format
+12.8k Golang : Chunk split or divide a string into smaller chunk example