您当前的位置: 首页 >  centos

ITKEY_

暂无认证

  • 0浏览

    0关注

    732博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

CentOS 7安装neofetc并DIY配置

ITKEY_ 发布时间:2021-01-22 16:31:01 ,浏览量:0

为什么要安装neofetch?用这个查询系统信息非常方便。 在这里插入图片描述 图形化的界面查看系统信息概况体验还是很不错的。

安装

基于 CentOS 7 的安装步骤如下

安装 epel-release
yum install epel-release
添加第三方软件源
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
使用包管理器安装 neofetch
yum install neofetch
运行
neofetch

运行以后默认配置就会看到如下的信息了。 在这里插入图片描述 这些信息还可以自定义的。

自定义显示项目+汉化
vim ~/.config/neofetch/config.conf

修改print_info()相关配置 我的配置如下,我翻译的不一定准确,仅供参考。

print_info() {
    info title
    info underline
    info "操作系统" distro
    info "型  号" model
    info "内核版本" kernel
    info "开机时间" uptime
    prin "当前时间" "$(date +%Y年%m月%d"日 "%H时%M分%S秒)"
    info "S h e ll" shell
    info "分  辨  率" resolution
    info "主  题" wm_theme
    info "Theme" theme
    info "Icons" icons
    info "终  端" term
    info "终端字体" term_font
    info "处  理  器" cpu
    info "显卡设备" gpu
    info "内  存" memory
    info "CPU 已用" cpu_usage
    info "剩余电量" battery
    info "内  网  IP" local_ip
    info "公  网  IP" public_ip
    info "用  户" users
    info "语  言" locale  
}

配置完成以后,在运行

neofetch

在这里插入图片描述 看起来舒服多啦!!!这样就可以一眼看到服务器的基本情况了,CPU和内存使用情况是我比较关心的。

更高级的配置见:

https://github.com/dylanaraps/neofetch/wiki/Customizing-Info

注释版本

包含注释防止我翻译的不准确。

print_info() {
    info title
    info underline
	#OS
    info "操作系统" distro
    #Host
    info "型  号" model
    #Kernel
    info "内核版本" kernel
    #Uptime
    info "开机时间" uptime

    prin "当前时间" "$(date +%Y年%m月%d"日 "%H时%M分%S秒)"
    #Packages
    #info "Packages" packages
    info "S h e ll" shell
    #Resolution
    info "分  辨  率" resolution
    #info "DE" de
    #info "WM" wm
    #WM Theme
    info "主  题" wm_theme
    info "Theme" theme
    info "Icons" icons
    #Terminal
    info "终  端" term
    #Terminal Font
    info "终端字体" term_font
    #CPU
    info "处  理  器" cpu
    #GPU
    info "显卡设备" gpu
    #Memory
    info "内  存" memory
    #info "GPU Driver" gpu_driver  # Linux/macOS only
    # CPU Usage
    info "CPU 已用" cpu_usage
    #info "Disk" disk
    #Battery
    info "剩余电量" battery
    # info "Font" font
    # info "Song" song
    # [[ "$player" ]] && prin "Music Player" "$player"
    # 本地IP
    info "内  网  IP" local_ip
    #Public IP
    info "公  网  IP" public_ip
    #Users
    #info "用户" users
    #Locale
    info "语  言" locale  # This only works on glibc systems.
    #info cols
}

参考文档: 《Mac系统中终端“图形化”查系统信息neofetch》

https://www.cnblogs.com/OneToken/p/12622462.html

关注
打赏
1665243900
查看更多评论
立即登录/注册

微信扫码登录

0.0375s