

root> cat /proc/cpuinfogrep processorwc -l 4.
#LINUX GET CPUINFO HOW TO#
In this article, we have seen how to check the CPU information in a Linux system. In the example below we see that our Linux server has 4 CPUs.
#LINUX GET CPUINFO WINDOWS#
There is less information in this output than ‘ lscpu‘ and the list of ‘ capabilities‘ is the same as the ‘ flags‘ listed in the output of lscpu. Open Hardware Monitor runs on 64-bit and 32-bit Microsoft Windows XP, Vista, 7, 8, 8.1, 10, and x86-based Linux OS without installation. Note that even though we are just reading the information, this command is recommended to be run as super-user, i.e.


This file contains all the information of a processor. We can use this command with the argument '-c CPU' to get a short output containing information about the CPU. One of the most basic ways to find the CPU info by displaying the content of the file /proc/cpuinfo. The lshw stands for ‘ list hardware‘ and it’s a command to get information about all the hardware used by the Linux system. You can also save this output to a file by simply redirecting the output. For example, you can output the data in ‘JSON’ format using the option '-J'. This command has some useful options as well. CPU-Z is a freeware that gathers information on some of the main devices of your system : Processor name and number, codename, process, package, cache levels. It will work no matter what Linux distribution you are using. The processor is a unique small integer identifying a CPU. Identifying the type of processor using the proc/cpuinfo file does not require installing any additional programs. The getcpu() system call identifies the processor and node on which the calling thread or process is currently running and writes them into the integers pointed to by the cpuand nodearguments. Command lscpuįirst, let us check out the simple command ‘lscpu’ which prints the information in a neat and more readable format. The simplest way to determine what type of CPU you have is by displaying the contents of the /proc/cpuinfo virtual file. Apart from reading this file, there are few inbuilt commands which you can run to get the CPU information. This will output the contents on the command line, and you can press ‘Enter’ to scroll down. You can also view the contents of this file directly on the command line by running: $ less /proc/cpuinfo $ vim /proc/cpuinfoĪs you can see in the screenshot above, all the information like the model name, speed, cache size, is present in the file. Open the file /proc/cpuinfo using a text editor of your choice. The -m 1 option supplied to grep will return only the model of one of the CPUs otherwise, you’ll get the model for each core on a multi-core CPU, and it’s almost certain that they will be the same. In Linux, CPU information is stored in a system file, which can be either read using a text editor, or it can be read and used in an administrative shell script. Which will output something like: model name : Intel (R) Core (TM) i5-7360U CPU 2.30GHz. The CPU Information in any machine includes information about the processor, the vendor details, model name, architecture, speed of processing, etc.
