neofetch 命令详解
neofetch 命令安装:
-bash/zsh: neofetch command not found
#Debian
apt-get install neofetch
#Ubuntu
apt-get install neofetch
#Alpine
apk add neofetch
#Arch Linux
pacman -S neofetch
#GoboLinux
sudo Compile neofetch
#NixOS
sudo nix-env -i neofetch
#Kali Linux
apt-get install neofetch
#Fedora
dnf install neofetch
#OS X
brew install neofetch
#Raspbian
apt-get install neofetch
#Docker
docker run cmd.cat/neofetch neofetch
#Windows - Install it from the Scoop.
scoop install neofetch
---- CentOS -----------------------
Neofetch is in Fedora's official repositories starting from Fedora 27.
sudo dnf install neofetch
Alternatively, you can use a third-party repo:
NOTE: If you are using RHEL/CentOS, change dnf into yum.
Make sure you have installed dnf-plugins-core
Enable COPR repository
sudo dnf copr enable konimex/neofetch
Install the package
sudo dnf install neofetch
Alternatively:
If you're using RHEL/CentOS, make sure you have installed epel-release
Fetch the repo file
curl -o /etc/yum.repos.d/konimex-neofetch-epel-7.repo https://copr.fedorainfracloud.org/coprs/konimex/neofetch/repo/epel-7/konimex-neofetch-epel-7.repo
NOTE: If you are using Fedora, change epel-7 to fedora-23 or your Fedora version respectively. However if you are using RHEL/CentOS 6, change it to epel-6.
Install the package
sudo dnf install neofetch
neofetch 命令补充说明:
neofetch 是 CLI
工具,用于显示有关操作系统,软件和硬件的信息。neoftech
支持将近 150 种不同的操作系统。从 Linux 到 Windows,一直到更晦涩的操作系统(如 Minix,AIX 和 Haiku)。
neofetch 获取信息后,最终效果如图:
neofetch 命令语法:
neofetch [Optional Flags]
neofetch 命令选项:
--disable 'infoname'
Allows you to disable an info line from appearing in the output.
NOTE: You can supply multiple args. eg.
´neofetch --disable cpu gpu disk shell´
NOTE: The arguments must all be lowercase.
--os_arch 'on/off'
Hide/Show OS architecture.
--speed_type 'type'
Change the type of cpu speed to display.
Possible values: current, min, max, bios, scaling_current, scaling_min, scaling_max
NOTE: This only support Linux with cpufreq.
--cpu_shorthand 'type'
Shorten the output of CPU
Possible values: name, speed, tiny, on, off
--cpu_cores 'logical/physical/off'
Whether or not to display the number of CPU cores
Note: 'physical' doesn't work on BSD.
--cpu_speed 'on/off'
Hide/Show cpu speed.
--cpu_temp 'on/off'
Hide/Show cpu temperature.
NOTE: This only works on Linux and BSD.
NOTE: For FreeBSD-based systems, you need to enable coretemp kernel module.
--distro_shorthand 'on/off'
Shorten the output of distro (tiny, on, off)
NOTE: This option won't work in Windows (Cygwin)
--kernel_shorthand 'on/off'
Shorten the output of kernel
NOTE: This option won't work in BSDs (except PacBSD and PC-BSD)
--uptime_shorthand 'on/off'
Shorten the output of uptime (tiny, on, off)
--refresh_rate 'on/off'
Whether to display the refresh rate of each monitor
Note: Unsupported on Windows
--gpu_brand on/off
Enable/Disable GPU brand in output. (AMD/NVIDIA/Intel)
--gtk_shorthand 'on/off'
Shorten output of gtk theme/icons
--gtk2 'on/off'
Enable/Disable GTK2 theme/icons output
--gtk3 'on/off'
Enable/Disable gtk3 theme/icons output
--shell_path 'on/off'
Enable/Disable showing $SHELL path
--shell_version 'on/off'
Enable/Disable showing $SHELL version
--ip_host 'url'
URL to query for public IP
--song_shorthand 'on/off'
Print the Artist/Title on seperate lines
--birthday_shorthand 'on/off'
Shorten the output of birthday
--birthday_time 'on/off'
Enable/Disable showing the time in birthday output
--birthday_format 'format'
Format the birthday output. (Uses 'date' cmd format)
TEXT FORMATTING
--colors x x x x x x
Changes the text colors in this order: title, @, underline, subtitle, colon, info
--underline on/off
enable/disable the underline.
--underline_char 'char'
Character to use when underlining title
--bold 'on/off'
Enable/Disable bold text
--prompt_height 'num'
Set this to your prompt height to fix issues with the text going off screen at the top
COLOR BLOCKS
--color_blocks 'on/off'
Enable/Disable the color blocks
--block_width 'num'
Width of color blocks in spaces
--block_height 'num'
Height of color blocks in lines
--block_range 'start' 'end'
Range of colors to print as blocks
BARS
--bar_char 'elapsed char' 'total char'
Characters to use when drawing bars.
--bar_border on/off
Whether or not to surround the bar with '[]'
--bar_length 'num'
Length in spaces to make the bars.
--bar_colors 'num' 'num'
Colors to make the bar.
Set in this order: elapsed, total
--cpu_display 'mode'
Bar mode.
Takes: bar, infobar, barinfo, off
--memory_display 'mode'
Bar mode.
Takes: bar, infobar, barinfo, off
--battery_display 'mode'
Bar mode.
Takes: bar, infobar, barinfo, off
--disk_display 'mode'
Bar mode.
Takes: bar, infobar, barinfo, off
IMAGE
--image 'type'
Image source. Where and what image we display.
Possible values: wall, ascii, /path/to/img, /path/to/dir/, off
--size 'size'
How to size the image.
Possible values: auto, 00px, 00%, none
--crop_mode 'mode'
Which crop mode to use
Takes the values: normal, fit, fill
--crop_offset 'value'
Change the crop offset for normal mode.
Possible values: northwest, north, northeast, west, center, east, southwest, south, southeast
--xoffset 'value'
How close the image will be to the left edge of the window in pixel. This only works with w3m.
--yoffset 'value'
How close the image will be to the top edge of the window. This only works with w3m.
--bg_color 'color'
Background color to display behind transparent image. This only works with w3m.
--gap 'num'
Gap between image and text.
NOTE: --gap can take a negative value which will move the text closer to the left side.
--clean
Delete cached files and thumbnails.
ASCII
--ascii 'value'
Where to get the ASCII from
Possible values: distro, /path/to/ascii
--ascii_colors x x x x x x
Colors to print the ASCII art
--ascii_distro 'distro'
Which Distro´s ASCII art to print
NOTE: Arch and Ubuntu have 'old' logo varients.
NOTE: Use 'arch_old' or 'ubuntu_old' to use the old logos.
NOTE: Ubuntu has flavor varients.
NOTE: Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME' or 'Ubuntu-Budgie' to use the flavors.
--ascii_logo_size 'size'
Size of ascii logo. Supported distros: Arch, Gentoo, Crux, OpenBSD. Possible values: small, normal
--ascii_bold 'on/off'
Whether or not to bold the ascii logo.
--logo | -L
Hide the info text and only show the ascii logo.
SCREENSHOT
--scrot 'path'
Take a screenshot, if path is left empty the screenshot function will use $scrot_dir and $scrot_name.
--upload | -su 'path'
Same as --scrot but uploads the scrot to a website.
--image_host 'host'
Website to upload scrots to. Takes: imgur, teknik
--scrot_cmd 'cmd'
Screenshot program to launch
OTHER
--config 'path'
Specify a path to a custom config file
--config none
Launch the script without a config file
--help
--test
Launch the script with all functions / options enabled. This should only be used for testing purposes, ie Travis.CI.
--version
Show neofetch version.
-v
Display error messages.
-vv
Display a verbose log for error reporting.
neofetch 命令实例:
neofetch 返回默认配置,并在程序首次运行时创建它:
neofetch
neofetch 触发一条信息行,使其不出现在输出中,其中 infoname
是配置文件中的函数名称,例如内存:
neofetch --enable|disable infoname
neofetch 隐藏/显示操作系统架构:
neofetch --os_arch on|off
neofetch 在输出中启用/禁用 CPU
品牌:
neofetch --cpu_brand on|off
评论区