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.1k Golang : Calculate Relative Strength Index(RSI) example
+4.9k Golang : micron to centimeter example
+7.4k SSL : How to check if current certificate is sha1 or sha2 from command line
+5.7k Cash Flow : 50 days to pay your credit card debt
+9.5k Golang : Eroding and dilating image with OpenCV example
+19.9k Golang : How to run your code only once with sync.Once object
+11.5k CodeIgniter : Import Linkedin data
+9.1k Golang : does not implement flag.Value (missing Set method)
+7.4k Golang : Rot13 and Rot5 algorithms example
+5.3k Javascript : How to loop over and parse JSON data?
+19.1k Golang : Get host name or domain name from IP address