37 C
Jaipur
Tuesday, April 13, 2021

cpufetch – awesome CPU architecture info tool for Linux/macOS

Must read


Typically we use the lscpu command or /proc/cpuinfo command on Linux to check CPU information. I recently found another simplistic yet fancier CPU architecture fetching tool inspired by neofetch, pfetch or screenfetch. Let us see how to install cpufetch on Linux, macOS, Android, and Windows to fetch CPU details.



cpufetch is awesome CPU architecture info fetching tool for Linux and macOS

We can build and install cpufetch from source on Linux or macOS using the following commands. First clone the repo:
git clone https://github.com/Dr-Noob/cpufetch
Now build it:
cd cpufetch && make
Install it
make install
Here is what we see:

install -Dm755 "cpufetch"   "/usr/bin/cpufetch"
install -Dm644 "LICENSE"    "/usr/share/licenses/cpufetch-git/LICENSE"
install -Dm644 "cpufetch.8" "/usr/share/man/man8/cpufetch.8.gz"

Installing cpufetch on Arch Linux using AUR

Try the following commands:

# AUR not ready? Set up AUR and we need
# packages:
# sudo pacman -S --needed base-devel
git clone https://aur.archlinux.org/cpufetch-git.git
cd cpufetch-git/
less PKGBUILD
makepkg -si

Android

First install termux application
Open termux and then run the following commands:
pkg install -y git make clang
Build from source normally on your Android device:
git clone https://github.com/Dr-Noob/cpufetch
cd cpufetch
make
make install

How to use cpufetch

The syntax is:
cpufetch
cpufetch [option]

Options

The default style is fancy. But we can switch to retro or legacy style as follows:
cpufetch -s retro
cpufetch -s legacy

We can use bash for loop as follows to test styles:

for s in fancy retro legacy
do
    clear
    cpufetch -s "$s"
    sleep 3
done

My AMD server:
cpufetch

We can display extra information (if available) about how cpufetch tried fetching information:
cpufetch -v
By default, cpufetch uses the system color scheme but we can the color scheme too:
cpufetch --color 239,90,45:210,200,200:100,200,45:0,200,200
We need to set 4 colorsin RGB with the format:
R,G,B:R,G,B:....
The first 2 colors are the CPU art color and the next 2 colors are the text colors.

Summing up

Overall it is one of those small and nicely written tools. I hope you enjoy it as I did. Checkout source code at Github.

Source link

- Advertisement -

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article