|

Show CPU Details Beautifully in Linux Terminal With CPUFetch

There are ways to check CPU information on Linux. Probably the most common is the lscpu command that gives you plenty of information about all the CPU cores on your system.

lscpu command output
lscpu command output

You may find CPU information there without installing any additional packages. That works of course. However, I recently stumbled upon a new tool that displays the CPU details in Linux in a beautiful manner.

The ASCII art of the processor manufacturer makes it look cool.

cpufetch for AMD processor

This looks beautiful, isn’t it? This is similar to Neofetch or Screenfetch tools that show the system information in beautiful ASCII art in Linux. Similar to those tools, you can use CPUFetch if you are showcasing your desktop screenshot.

The tool outputs the ASCII art of the processor manufacturer, its name, microarchitecture, frequency, cores, threads, peak performance, cache sizes, Advanced Vector Extensions, and more.

You can use custom colors apart from a few themes it provides. This gives you additional degree of freedom when you are ricing your desktop and want to color match all the elements on your Linux setup.

Installing CPUFetch on Linux

Unfortunately, CPUFetch is rather new, and it is not included in your distribution’s repository. It doesn’t even provide ready to use DEB/RPM binaries, PPAs, Snap or Flatpak packages.

Arch Linux users can find it in AUR but for others, the only way forward here is to build from source code.

Don’t worry. Installation as well as removal is not that complicated. Let me show you the steps.

I am using Ubuntu and you would need to install Git on Ubuntu first. Some other distributions come preinstalled with it, if not use your distribution’s package manager to install it.

Now, clone the Git repository wherever you want. Home directory is fine as well.

git clone https://github.com/Dr-Noob/cpufetch

Switch to the directory you just cloned:

cd cpufetch

You’ll see a make file here. Use it to compile the code.

make
cpufetch installation
CPUFetch Installation

Now you’ll see a new executable file named cpufetch. You run this executable to display the CPU information in the terminal.

./cpufetch

This is what it showed for my system. AMD logo looks a lot cooler in ASCII, don’t you think?

cpufetch showing CPU information in Linux terminal for itsfoss

How do you remove Cpufetch? It’s pretty simple. When you compiled the code, it produced just one file and that too in the same directory as the rest of the code.

So, to remove CPUFetch from your system, simply remove its entire folder. You know how to remove a directory in Linux terminal, don’t you? Come out of the cpufetch directory and use the rm command:

rm -rf cpufetch

That was simple, thankfully because removing software installed from source code could be really tricky at times.

Back to cpufetch. I think it’s a utility for those who like to show off their desktop screenshots in various Linux group. Since we have Neofetch for the distribution and CPUFetch for CPU, I wonder if we could have a GPU fetch with ASCII art of Nvidia as well :)

Similar Posts

  • Been using/playing with this thing for a while now. It’s good fun. You can prettify the text by running ‘cpufetch | lolcat’

  • I couldn’t successfully do this:

    First I had to install “make” and then I got

    “`
    make
    gcc -Wall -Wextra -Werror -pedantic -fstack-protector-all -pedantic -std=c99 -DARCH_X86 -O3 -Wfloat-equal -Wshadow -Wpointer-arith src/common/main.c src/common/cpu.c src/common/udev.c src/common/printer.c src/common/args.c src/common/global.c src/x86/cpuid.c src/x86/apic.c src/x86/cpuid_asm.c src/x86/uarch.c -o cpufetch
    make: gcc: Command not found
    make: *** [Makefile:48: cpufetch] Error 127
    “`

    Tried sudo and then:

    “`
    make
    gcc -Wall -Wextra -Werror -pedantic -fstack-protector-all -pedantic -std=c99 -DARCH_X86 -O3 -Wfloat-equal -Wshadow -Wpointer-arith src/common/main.c src/common/cpu.c src/common/udev.c src/common/printer.c src/common/args.c src/common/global.c src/x86/cpuid.c src/x86/apic.c src/x86/cpuid_asm.c src/x86/uarch.c -o cpufetch
    make: gcc: Command not found
    make: *** [Makefile:48: cpufetch] Error 127
    “`

  • Thank you, it is an interesting utility; always willing to try new things. My terminal width is normally set at 96 columns; I had to set it at 120 columns to avoid the linewrap. I think it would have been better to place the cpu ascii graphics above the displayed information similar to the way is done with linuxlogo. But as they say when using linux, each of us is free to brew our own cup of coffee, or tea.

  • “You may find CPU information there without installing any additional packages.”
    Playing with words, but you have to down source code and make.

      • Hi Abhishek, could you please assist me what needs to be modified in Makefile. I am a newbee in Linux and i was unable to get the exact output as you.

          • [[email protected] cpufetch]# ./cpufetch.8
            ./cpufetch.8: line 1: .”: command not found
            ./cpufetch.8: line 2: .TH: command not found
            ./cpufetch.8: line 3: .SH: command not found
            ./cpufetch.8: line 4: syntax error near unexpected token `(‘
            ./cpufetch.8: line 4: `cpufetch – manual page for cpufetch v0.97 (x86_64 build)’

            above is the output i get when i run the file.

            Also, please let me know how to add snip in this comment section. So you would get more info on my error.

            Thanks,
            Yogendra