There are obviously many more commands to get the CPU info, some of which are not available by default and need to be installed separately. In this article, we have seen how to check the CPU information in a Linux system. 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. Note that even though we are just reading the information, this command is recommended to be run as super-user, i.e. We can use this command with the argument '-c CPU' to get a short output containing information about the CPU. 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. Command lscpuįirst, let us check out the simple command ‘lscpu’ which prints the information in a neat and more readable format. 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. Open the file /proc/cpuinfo using a text editor of your choice. 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. 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. The CPU Information in any machine includes information about the processor, the vendor details, model name, architecture, speed of processing, etc.
0 Comments
Leave a Reply. |