6

cpufetch - awesome CPU architecture info tool for Linux/macOS - nixCraft

 3 years ago
source link: https://www.cyberciti.biz/open-source/install-cpufetch-on-linux-macos-android-to-get-cpu-architecture-info/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

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.

ADVERTISEMENT

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. Next 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.
Patreon supporters only guides 🤓

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.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via

RSS feed ➔   Weekly email newsletter ➔

ADVERTISEMENT

Comments on this entry are closed.

  • Skye Romero Apr 29, 2021 @ 22:56

    Nice tools. I love simple and easy to use CLI software.

Comments are closed. Still have questions? Post it on our forum

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK