The neofetch command like utility written in a bash shell. The main purpose of neofetch is to be used in screenshots to display other users what operating system or Linux distro you are using including theme, icons, hardware config and more. Now we have another tool called pfetch. It is a pretty system information tool written in POSIX sh. Let us see how to install and use pfetch Linux and Unix hardware information tool.
pfetch Linux and Unix hardware info script
From the project page:
The goal of this project is to implement a simple system information tool in POSIX sh using features built into the language itself (where possible).
The source code is highly documented and I hope it will act as a learning resource for POSIX sh and simple information detection across various different operating systems.
If anything in the source code is unclear or is lacking in its explanation, open an issue. Sometimes you get too close to something and you fail to see the “bigger picture”!
Use the wget command on Linux or Unix to install pfetch:
Use the unzip command or tar command to unzip the file named master.zip on Linux or Unix:
Install the file using install command:
sudo install pfetch-master/pfetch /usr/local/bin/
ls -l /usr/local/bin/pfetch
Cloning git repo (alternate installation method)
One can try the git command and clone the pfetch repo on macOS/BSD/Linux and Unix systems too:
git clone https://github.com/dylanaraps/pfetch.git
sudo install pfetch/pfetch /usr/local/bin/
ls -l /usr/local/bin/pfetch
Now that pfetch installed, it is time to run it. Simply type:
- Windows subsystem for Linux.
- Various Linux disros such as Alpine Linux, Arch Linux, Ubuntu, CentOS, Debian, and more.
You can control pfetch through shell environment variables. For example, just show os, kernel and uptime, run:
PF_INFO="ascii title os host kernel uptime" /usr/local/bin/pfetch
_ vivek@nixcraft-nuc02 ---(_) os Ubuntu 18.04.3 LTS _/ --- \ host NUC7i7DNHE J85489-204 (_) | | kernel 5.0.0-29-generic \ --- _/ uptime 6d 19h 41m ---(_)
Overall it is a little and delightful system information tool written in POSIX sh. The code is fully documented very well. See project home page here for more information and options. If you like pfetch check out related tools:
|Category||List of Unix and Linux commands|
|Firewall||Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04|
|Network Utilities||dig • host • ip • nmap|
|OpenVPN||CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04|
|Package Manager||apk • apt|
|Processes Management||bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time|
|Searching||grep • whereis • which|
|User Information||groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w|
|WireGuard VPN||Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04|