Fetching Linux system details with screenfetch and neofetch

以下是如何使用ScreenFetch和Neofetch命令显示Linux系统中的一些最重要的配置信息。

Two very useful tools for extracting essential details on your Linux system OS and hardware arescreenfetchgeofetch.

Each of these tools is actually a lengthy bash script that fetches the information from your system for you and presents it in an attractive manner with the distribution logo on the left and details on the right--essentially "screen shots" of your system. Neither is likely to be installed on your system by default, but each can be installed with a single command.

screenfetch

你可以安装screenfetchsudoapt安装screenfetch.要么sudo yum安装screenfetch。ScreenFetch是一个绰号近6,500行的脚本。它将自动检测您安装的分发,内核,正常运行时间,您正在使用的包,您正在使用的shell,整体和可用的磁盘空间,CPU,GPU和内存(在使用中使用和可用)。它还显示了与其运行的任何分布相关的徽标的ASCII艺术Rendition,但如果您想只是查看详细信息列表,则可以关闭此操作。

来自此命令的输出将如此如此(在Ubuntu上)看起来,但在颜色中:

$ screenfetch ./+o+- shs@dragonfly yyyyy- -yyyyyy+ OS: Ubuntu 20.04 focal ://+//////-yyyyyyo Kernel: x86_64 Linux 5.4.0-52-generic .++ .:/++++++/-.+sss/` Uptime: 25d 23h 44m .:++o: /++++++++/:--:/- Packages: 2882 o:+o+:++.`..```.-/oo+++++/ Shell: bash 5.0.17 .:+o:+o/. `+sssoo+/ Disk: 62G / 541G (12%) .++/+:+oo+o:` /sssooo. CPU: Intel Core2 Duo E8400 @ 2x 2.997GHz /+++//+:`oo+o /::--:. GPU: AMD/ATI Caicos [Radeon HD 6450/7450/8450 \+/+o+++`o++o ++////. RAM: 915MiB / 5944MiB .++.o+++oo+:` /dddhhh. .+.o+oo:. `oddhhhh+ \+.++o+o``-````.:ohdhhhhh+ `:o+++ `ohhhhhhhhyo++os: .o:`.syhhhhhhh/.oo++o` /osyyyyyyo++ooo+++/ ````` +oo+++o\: `oo++.

To omit the ASCII art logo and see just the system details, add a-N选项。

$ screenfetch -n shs @ dragonfly os:ubuntu 20.04焦点内核:x86_64 linux 5.4.0-52-generic正常运行时间:25d 23h 50m套装:2882 shell:bash 5.0.17磁盘:62g / 541g(12%)CPU:英特尔Core2DUO E8400 @ 2x 2.997GHz GPU:AMD / ATI CAICOS [RADEON HD 6450/7450 / 8450 / R5 230 OEM] RAM:903MIB / 5944MIB

添加A.-v.(verbose)选项将脚本将脚本连接到显示系统信息时显示。毕竟“查找”消息后,它将显示通常的输出。

$ screenfetch -v :: Finding distro...found as 'Ubuntu 20.04' :: Finding hostname and user...found as 'shs@dragonfly' :: Finding kernel version...found as 'x86_64 Linux 5.4.0-52-generic' :: Finding current uptime...found as '25d 23h 54m' :: Finding current package count...found as '2882' :: Finding current shell...found as 'bash 5.0.17' :: Finding current resolution(s)...found as 'No X Server' :: Finding desktop environment...found as 'Not Present' :: Finding window manager...found as 'Not Found' :: Finding window manager theme...found as 'Not Found' :: Finding GTK2 theme...found as 'Not Found' :: Finding GTK3 theme...found as 'Adwaita' :: Finding icon theme...found as 'Not Found' :: Finding user font...found as 'Not Found' :: Finding current CPU...found as 'Intel Core2 Duo E8400 @ 2x 2.997GHz' :: Finding current disk usage...found as '62G / 541G (12%%)' :: Finding current GPU...found as 'AMD/ATI Caicos [Radeon HD 6450/7450/8450 / R5 230 OEM]' :: Finding current RAM usage...found as '902MiB / 5944MiB'

Thescreenfetch脚本已安装为/ usr / bin / screenfetch

$ ls -l /usr/bin/screenfetch -rwxr-xr-x 1 root root 244084 Nov 27 15:17 /usr/bin/screenfetch

新辛精

The新辛精脚本甚至延长screenfetchscript. It has over 10,000 lines and displays some additional system information. You can install it with a command such assudo apt install neofetch要么sudo dnf安装neofetch。Likescreenfetch,新辛精detects the information that it displays and adds an ASCII art depiction of the distribution logo to the display.

$ neofetch .-/+oossssoo+/-. shs@dragonfly `:+ssssssssssssssssss+:` ------------- -+ssssssssssssssssssyyssss+- OS: Ubuntu 20.04.1 LTS x86_64 .ossssssssssssssssssdMMMNysssso. Host: Inspiron 530s /ssssssssssshdmmNNmmyNMMMMhssssss/ Kernel: 5.4.0-52-generic +ssssssssshmydMMMMMMMNddddyssssssss+ Uptime: 26 days, 21 mins /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Packages: 3049 (dpkg), 15 (snap) .ssssssssdMMMNhsssssssssshNMMMdssssssss. Shell: bash 5.0.17 +sssshhhyNMMNyssssssssssssyNMMMysssssss+ Resolution: 1920x1080 ossyNMMMNyMMhsssssssssssssshmmmhssssssso Terminal: /dev/pts/0 ossyNMMMNyMMhsssssssssssssshmmmhssssssso CPU: Intel Core 2 Duo E8400 (2) @ 2.997GHz +sssshhhyNMMNyssssssssssssyNMMMysssssss+ GPU: AMD ATI Radeon HD 6450/7450/8450 / R5 .ssssssssdMMMNhsssssssssshNMMMdssssssss. Memory: 620MiB / 5944MiB /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/ +sssssssssdmydMMMMMMMMddddyssssssss+ /ssssssssssshdmNNNNmyNMMMMhssssss/ .ossssssssssssssssssdMMMNysssso. -+sssssssssssssssssyyyssss+- `:+ssssssssssssssssss+:` .-/+oossssoo+/-.

如您所见,主机的行(系统类型),屏幕分辨率和终端都包含在内screenfetch, but the information on disk capacity and usage is not. By usingsudo,我能够获取包含的磁盘信息。

Many other options appear to be available as well.

$ sudo neofetch .- / + oossssoo +/-。root @ dragonfly`:+ sssssssssssssssssss +:`-------------  -  + sssssssssssssssssssyyssss +  -  OS:Ubuntu 20.04.1 LTS x86_64 .osssssssssssssssssssssssssssssssssdmmmnyssso。主持人:的Inspiron 530S / ssssssssssshdmmNNmmyNMMMMhssssss /内核:5.4.0-52-通用+ ssssssssshmydMMMMMMMNddddyssssssss +正常运行时间:26天,1小时21分钟/ sssssssshNMMMyhhyyyyhmNMMMNhssssssss /包:3049(dpkg的),15(SNAP).ssssssssdMMMNhsssssssssshNMMMdssssssss。壳牌:庆典5.0.17 + sssshhhyNMMNyssssssssssssyNMMMysssssss +分辨率:1920×1080 ossyNMMMNyMMhsssssssssssssshmmmhssssssso CPU:英特尔Core 2 Duo E8400(2)@ 2.997GHz ossyNMMMNyMMhsssssssssssssshmmmhssssssso GPU:AMD的ATI Radeon HD 6450/7450/8450 / R5 + sssshhhyNMMNyssssssssssssyNMMMysssssss +内存:624MiB / 5944MiB .ssssssssdMMMNhsssssssssshNMMMdssssssss。磁盘(/):20g / 110g(19%)<==./ sssssssshnmmmmyhyyyyhdnmmmmnhsssssss / public ip:204.111.9.145 + sssssssssdmydmmmmmmmmmdddysssssssss + / ssssssssssssssssssssssssss / .ossssssssssssssssssdmmmnysssoso。-  + sssssssssssssssssyyyssss +  - `:+ sssssssssssssssssss +:`.- / + oossssoo +/-。

The新辛精脚本已安装为/usr/bin/neofetch

$ ls -l /usr/bin/neofetch -rwxr-xr-x 1 root root 320947 Nov 27 17:01 /usr/bin/neofetch

在这里re some additional comparisons of the tools--script size, length and run time:

$ WC -L / USR / BIN / *获取10083 / USR / BIN / NEOFETCH 6469 / USR / BIN / SCRIEFETCH $时间屏幕筛选|Tail -1 Real 0M0.564S用户0M0.366S SYS 0M0.164S $ TIME NEOFETCH |Tail -1 Real 0M0.364S用户0M0.228S SYS 0M0.112S

包起来

这俩screenfetch新辛精脚本提供了非常有用和很好的格式化的重要系统信息。

新辛精可能是较新的工具(通过包含字符串“neo”的名称建议)并提供一些其他选项。这两种工具都可以易于使用,作为键入他们的名称,它们提供了重要的系统细节。

加入网络世界社区有个足球雷竞技appFacebook.LinkedIn评论是最重要的主题。
Related:

版权© 2020Raybet2

IT薪水调查:结果是在