In Linux, β/procβ is a special virtual file system that contains valuable system-related information in different files. Such a file is β/proc/cpuinfoβ, which stores detailed information about the CPU, such as vendor ID, CPU family, model name, virtualization features, caches, and many more.
Since itβs a read-only file, you canβt modify it, but you can use the βcatβ or βbatβ command to view its contents.
$ cat /proc/cpuinfoOutput:

This file provides much more CPU information compared to other built-in or external tools. If you are familiar with specific fields in this file, you can use other tools such as βgrepβ or βcutβ to extract information from that field, which you can then use in a command or shell script.
For example, the file mentions the CPU model name multiple times, which I want to extract. The condition is that the output should contain only one occurence, disregarding all others. For this purpose, you can use the following command:
$ cat /proc/cpuinfo | grep "model name" | uniqThe above command will search for the βmodel nameβ field using the βgrepβ command and then retain only one occurrence using βuniqβ command.

Alternatively, if you only want to output the βmodel nameβ value without the field name, you can use the βcutβ command for that purpose.
$ cat /proc/cpuinfo | grep "model name" | uniq | cut -d " " -f 3-The command above will function almost identically to the previous one, except it will output only the third and subsequent fields, omitting the previous two.

This way, you can use the information from β/proc/cpuinfoβ in a command or shell script. Now, most of the fields are named in a manner that allows anyone to readily identify and understand the value they represent, except for the flags.
Flags in the /proc/cpuinfo File
The βflagsβ field in the β/proc/cpuinfoβ file contains various flags that define the number of processors attribute. So, letβs see some of the most important flags and understand what information they provide.
| Flag | Description |
|---|---|
fpu | Indicates the presence of a floating-point unit. |
vme | Virtual 8086 mode enhancements. |
de | Debugging extensions. |
pse | Page size extensions. |
tsc | Time stamp counter. |
msr | Model-specific registers. |
pae | Physical address extensions. |
mce | Machine check exception. |
apic | Advanced Programmable Interrupt Controller. |
sep | Fast system call. |
pge | Page global enable. |
mca | Machine check architecture. |
pat | Page attribute table. |
clflush | Cache line flush instruction. |
mmx | Multimedia extensions. |
sse | Streaming SIMD Extensions. |
sse2 | Streaming SIMD Extensions 2. |
syscall | SYSCALL and SYSRET instructions. |
lm | Long mode (64-bit support). |
constant_tsc | TSC ticks at a constant rate. |
ssse3 | Supplemental Streaming SIMD Extensions 3. |
fma | Fused multiply-add. |
pcid | Process-context identifiers. |
sse4_1 | Streaming SIMD Extensions 4.1. |
sse4_2 | Streaming SIMD Extensions 4.2. |
avx | Advanced Vector Extensions. |
f16c | 16-bit floating-point conversion instructions. |
hypervisor | Indicates the system is running under a hypervisor. |
The above are a few of the many flags. For a comprehensive list of all flags, along with links for further understanding, refer to this Stack Exchange answer.
Final Word
This article has come to an end. I hope you learned and understood more about the β/etc/cpuinfoβ file in this article. If you have any questions or queries about the topic, please leave a comment.
Till then, peace!




