How to use the command screenfetch (with examples)
Screenfetch is a command-line utility that displays system information in the terminal. It retrieves details such as the distribution name, kernel version, CPU information, and more. It also mentions the window manager or desktop environment being used. Screenfetch is a handy tool for quickly checking system information and generating ASCII art logos for various distributions.
Use case 1: Start screenfetch
Code:
screenfetch
Motivation: This command is the simplest and most common use case. By executing this command, you can quickly display system information in the terminal. It provides an easy way to gather information about your computer without having to navigate through various system menus or settings.
Example output:
_,met$$$$$gg. user@hostname
,g$$$$$$$$$$$$$$$P. -------------
,g$$P" """Y$$.". OS: Ubuntu 20.04 LTS
,$$P' `$$$. Kernel: 5.4.0-58-generic
',$$P ,ggs. `$$b: Uptime: 3 days, 2 hours, 15 minutes
`d$$' ,$P"' . $$$ Packages: 1754 (dpkg), 15 (snap)
$$P d$' , $$P Shell: bash 5.0.17
$$: $$. - ,d$$' Resolution: 1920x1080
$$\; Y$b._ _,d$P' WM: GNOME Shell
Y$$. `.`"Y$$$$P"' Theme: Adwaita [GTK2/3]
`$$b "-.__ Icons: Yaru [GTK2/3]
`Y$$ Terminal: gnome-terminal
`Y$$. kubectl: command not found
`$$b._____ gnupg: /usr/bin/gpg
`$$$$$$$$$b, Docker: Not Found
`""""""` Processes: 305
Use case 2: Take a screenshot
Code:
screenfetch -s
Motivation: Adding the “-s” flag to the screenfetch command allows you to take a screenshot of the terminal output. This is useful when you want to save or share the system information with others.
Example output:
Screenshot saved as: /home/user/Pictures/screenfetch_20210101_123456.png
Use case 3: Specify distribution logo
Code:
screenfetch -A 'distribution_name'
Motivation: By default, screenfetch determines the distribution logo based on the detected distribution. However, if it fails to identify the distribution correctly or if you want to display a different logo, you can use this command. Replace ‘distribution_name’ with the desired distribution name enclosed in quotes.
Example output:
_,met$$$$$gg. user@hostname
,g$$$$$$$$$$$$$$$P. -------------
,g$$P" """Y$$." OS: distribution_name
,$$P' `$$$. Kernel: 5.4.0-58-generic
',$$P ,ggs. `$$b: Uptime: 3 days, 2 hours, 15 minutes
`d$$' ,$P"' . $$$ Packages: 1754 (dpkg), 15 (snap)
$$P d$' , $$P Shell: bash 5.0.17
$$: $$. - ,d$$' Resolution: 1920x1080
$$\; Y$b._ _,d$P' WM: GNOME Shell
Y$$. `.`"Y$$$$P"' Theme: Adwaita [GTK2/3]
`$$b "-.__ Icons: Yaru [GTK2/3]
`Y$$ Terminal: gnome-terminal
`Y$$. kubectl: command not found
`$$b._____ gnupg: /usr/bin/gpg
`$$$$$$$$$b, Docker: Not Found
`""""""` Processes: 305
Use case 4: Specify distribution logo and text
Code:
screenfetch -D 'distribution_name'
Motivation: Similar to the previous use case, this command allows you to specify a distribution logo. Additionally, it also lets you add custom text to the output. Replace ‘distribution_name’ with the desired distribution name enclosed in quotes.
Example output:
_,met$$$$$gg. user@hostname
,g$$$$$$$$$$$$$$$P. -------------
,g$$P" """Y$$." OS: Ubuntu 20.04 LTS (Custom Text)
,$$P' `$$$. Kernel: 5.4.0-58-generic
',$$P ,ggs. `$$b: Uptime: 3 days, 2 hours, 15 minutes
`d$$' ,$P"' . $$$ Packages: 1754 (dpkg), 15 (snap)
$$P d$' , $$P Shell: bash 5.0.17
$$: $$. - ,d$$' Resolution: 1920x1080
$$\; Y$b._ _,d$P' WM: GNOME Shell
Y$$. `.`"Y$$$$P"' Theme: Adwaita [GTK2/3]
`$$b "-.__ Icons: Yaru [GTK2/3]
`Y$$ Terminal: gnome-terminal
`Y$$. kubectl: command not found
`$$b._____ gnupg: /usr/bin/gpg
`$$$$$$$$$b, Docker: Not Found
`""""""` Processes: 305
Use case 5: Strip all color
Code:
screenfetch -N
Motivation: By default, screenfetch outputs system information with colorful ASCII art and text. However, if you prefer a more stripped-down and colorless output, you can use this command.
Example output:
user@hostname
-------------
OS: Ubuntu 20.04 LTS
Kernel: 5.4.0-58-generic
Uptime: 3 days, 2 hours, 15 minutes
Packages: 1754 (dpkg), 15 (snap)
Shell: bash 5.0.17
Resolution: 1920x1080
WM: GNOME Shell
Theme: Adwaita [GTK2/3]
Icons: Yaru [GTK2/3]
Conclusion:
Screenfetch is a versatile command-line utility for displaying system information in a visually appealing manner. It provides various options to customize the output, including specifying distribution logos, adding custom text, and stripping color. Whether you need a quick overview of your system or want to create ASCII art logos, screenfetch is a handy tool to have in your arsenal.