Install NeoFetch on Centos 7 / RHEL / Ubuntu Updated*

Last Updated on

Neofetch is a useful tool for displaying relevant metrics to your machines’s current operating session such as resources, uptime, memory load and environment criteria.  It can be very useful to run automatically when a new terminal session is created via bashrc – it is far more welcoming than a flashing cursor after login!  On my custom router I like to have neofetch, vnstat, hardware metrics and drive usage displayed after login.

DNF is required; Installation is simple:

1
2
3
4
sudo yum -y install dnf
sudo dnf -y install dnf-plugins-core
sudo dnf -y copr enable konimex/neofetch
sudo dnf -y install neofetch

It seems they moved it to DNF.  Updated to reflect this.

———————————————————————–

Depricated Method:

Installation is simple.  If you have not already done so, enable the EPEL repository.

1
sudo yum install neofetch

…or if you prefer, one code block:

1
2
3
sudo yum install -y epel-release
sudo yum install neofetch
neofetch

And for Ubuntu…

1
2
3
sudo add-apt-repository ppa:dawidd0811/neofetch
sudo apt-get update
sudo apt-get install -y neofetch
Lima

About the author

Lima is the visual nautical indicator for "stop instantly."

Comments

  1. Pingback: bashrc - Vassox
  2. I was able to get the epel repo installed no problem but got a “no package neofetch available” result on two different machines; both running centos 7.6.1810.

  3. File “/bin/dnf”, line 57, in
    from dnf.cli import main
    File “/usr/lib/python2.7/site-packages/dnf/__init__.py”, line 30, in
    import dnf.base
    File “/usr/lib/python2.7/site-packages/dnf/base.py”, line 29, in
    import libdnf.transaction
    File “/usr/lib64/python2.7/site-packages/libdnf/__init__.py”, line 3, in
    from . import conf
    File “/usr/lib64/python2.7/site-packages/libdnf/conf.py”, line 17, in
    _conf = swig_import_helper()
    File “/usr/lib64/python2.7/site-packages/libdnf/conf.py”, line 16, in swig_import_helper
    return importlib.import_module(‘_conf’)
    File “/usr/lib64/python2.7/importlib/__init__.py”, line 37, in import_module
    __import__(name)
    ImportError: No module named _conf

    1. Sorry i didnt expect such a fast replay. I will monitoring the thread every hour.

      Basically this happens when i try to enable the repo :

      sudo dnf -y copr enable konimex/neofetch

      1. I ran the above code block on a virgin Centos 7 install. What OS / version are you running specifically? It looks like you may have a python configuration issue; perhaps try removing all your python libraries and reinstall? do other dnf operations function with other repositories? here’s my output:

        PS C:\data> ssh root@mini
        The authenticity of host ‘mini (192.168.2.166)’ can’t be established.
        ECDSA key fingerprint is SHA256:B92kmv7xULV9N4oKh0dxLSiVSN8FPhS8mYTDZ6yeEqg.
        Are you sure you want to continue connecting (yes/no)? yes
        Warning: Permanently added ‘mini,192.168.2.166’ (ECDSA) to the list of known hosts.
        Last login: Mon Feb 25 20:18:06 2019
        [root@mini ~]# sudo yum -y install dnf
        o dnf -y install dnf-plugins-core
        sudo dnf -y copr enable konimex/neofetch
        sudo dnf -y install neofetch
        Loaded plugins: fastestmirror
        Determining fastest mirrors
        epel/x86_64/metalink | 17 kB 00:00:00
        * base: mirror.lug.udel.edu
        * epel: ewr.edge.kernel.org
        * extras: mirror.lug.udel.edu
        * updates: mirror.lug.udel.edu
        base | 3.6 kB 00:00:00
        epel | 4.7 kB 00:00:00
        extras | 3.4 kB 00:00:00
        updates | 3.4 kB 00:00:00
        (1/4): epel/x86_64/updateinfo | 998 kB 00:00:00
        (2/4): epel/x86_64/primary_db | 6.7 MB 00:00:01
        (3/4): extras/7/x86_64/primary_db | 201 kB 00:00:01
        (4/4): updates/7/x86_64/primary_db | 5.0 MB 00:00:01
        Resolving Dependencies
        –> Running transaction check
        —> Package dnf.noarch 0:4.0.9.2-1.el7_6 will be installed
        –> Processing Dependency: python2-dnf = 4.0.9.2-1.el7_6 for package: dnf-4.0.9.2-1.el7_6.noarch
        –> Running transaction check
        —> Package python2-dnf.noarch 0:4.0.9.2-1.el7_6 will be installed
        –> Processing Dependency: dnf-data = 4.0.9.2-1.el7_6 for package: python2-dnf-4.0.9.2-1.el7_6.noarch
        –> Processing Dependency: python2-libdnf >= 0.22.5 for package: python2-dnf-4.0.9.2-1.el7_6.noarch
        –> Processing Dependency: python2-libcomps >= 0.1.8 for package: python2-dnf-4.0.9.2-1.el7_6.noarch
        –> Processing Dependency: python2-hawkey >= 0.22.5 for package: python2-dnf-4.0.9.2-1.el7_6.noarch
        –> Processing Dependency: libmodulemd >= 1.4.0 for package: python2-dnf-4.0.9.2-1.el7_6.noarch
        –> Processing Dependency: python2-libdnf for package: python2-dnf-4.0.9.2-1.el7_6.noarch
        –> Processing Dependency: python-enum34 for package: python2-dnf-4.0.9.2-1.el7_6.noarch
        –> Processing Dependency: deltarpm for package: python2-dnf-4.0.9.2-1.el7_6.noarch
        –> Running transaction check
        —> Package deltarpm.x86_64 0:3.6-3.el7 will be installed
        —> Package dnf-data.noarch 0:4.0.9.2-1.el7_6 will be installed
        –> Processing Dependency: libreport-filesystem for package: dnf-data-4.0.9.2-1.el7_6.noarch
        —> Package libmodulemd.x86_64 0:1.6.3-1.el7 will be installed
        –> Processing Dependency: libyaml-0.so.2()(64bit) for package: libmodulemd-1.6.3-1.el7.x86_64
        —> Package python-enum34.noarch 0:1.0.4-1.el7 will be installed
        —> Package python2-hawkey.x86_64 0:0.22.5-1.el7_6 will be installed
        –> Processing Dependency: libdnf(x86-64) = 0.22.5-1.el7_6 for package: python2-hawkey-0.22.5-1.el7_6.x86_64
        –> Processing Dependency: libsolvext.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.22.5-1.el7_6.x86_64
        –> Processing Dependency: libsolv.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.22.5-1.el7_6.x86_64
        –> Processing Dependency: libsolvext.so.0()(64bit) for package: python2-hawkey-0.22.5-1.el7_6.x86_64
        –> Processing Dependency: libsolv.so.0()(64bit) for package: python2-hawkey-0.22.5-1.el7_6.x86_64
        –> Processing Dependency: librepo.so.0()(64bit) for package: python2-hawkey-0.22.5-1.el7_6.x86_64
        –> Processing Dependency: libdnf.so.2()(64bit) for package: python2-hawkey-0.22.5-1.el7_6.x86_64
        —> Package python2-libcomps.x86_64 0:0.1.8-12.el7 will be installed
        –> Processing Dependency: libcomps(x86-64) = 0.1.8-12.el7 for package: python2-libcomps-0.1.8-12.el7.x86_64
        –> Processing Dependency: libcomps.so.0.1.6()(64bit) for package: python2-libcomps-0.1.8-12.el7.x86_64
        —> Package python2-libdnf.x86_64 0:0.22.5-1.el7_6 will be installed
        –> Running transaction check
        —> Package libcomps.x86_64 0:0.1.8-12.el7 will be installed
        —> Package libdnf.x86_64 0:0.22.5-1.el7_6 will be installed
        —> Package librepo.x86_64 0:1.8.1-7.el7 will be installed
        —> Package libreport-filesystem.x86_64 0:2.1.11-42.el7.centos will be installed
        —> Package libsolv.x86_64 0:0.6.34-2.el7 will be installed
        —> Package libyaml.x86_64 0:0.1.4-11.el7_0 will be installed
        –> Finished Dependency Resolution

        Dependencies Resolved

        ==========================================================================================================================================
        Package Arch Version Repository Size
        ==========================================================================================================================================
        Installing:
        dnf noarch 4.0.9.2-1.el7_6 extras 357 k
        Installing for dependencies:
        deltarpm x86_64 3.6-3.el7 base 82 k
        dnf-data noarch 4.0.9.2-1.el7_6 extras 51 k
        libcomps x86_64 0.1.8-12.el7 extras 75 k
        libdnf x86_64 0.22.5-1.el7_6 extras 533 k
        libmodulemd x86_64 1.6.3-1.el7 extras 141 k
        librepo x86_64 1.8.1-7.el7 base 81 k
        libreport-filesystem x86_64 2.1.11-42.el7.centos base 39 k
        libsolv x86_64 0.6.34-2.el7 base 328 k
        libyaml x86_64 0.1.4-11.el7_0 base 55 k
        python-enum34 noarch 1.0.4-1.el7 base 52 k
        python2-dnf noarch 4.0.9.2-1.el7_6 extras 414 k
        python2-hawkey x86_64 0.22.5-1.el7_6 extras 68 k
        python2-libcomps x86_64 0.1.8-12.el7 extras 47 k
        python2-libdnf x86_64 0.22.5-1.el7_6 extras 608 k

        Transaction Summary
        ==========================================================================================================================================
        Install 1 Package (+14 Dependent packages)

        Total download size: 2.9 M
        Installed size: 11 M
        Downloading packages:
        (1/15): deltarpm-3.6-3.el7.x86_64.rpm | 82 kB 00:00:00
        (2/15): dnf-data-4.0.9.2-1.el7_6.noarch.rpm | 51 kB 00:00:00
        (3/15): dnf-4.0.9.2-1.el7_6.noarch.rpm | 357 kB 00:00:00
        (4/15): libcomps-0.1.8-12.el7.x86_64.rpm | 75 kB 00:00:00
        (5/15): libdnf-0.22.5-1.el7_6.x86_64.rpm | 533 kB 00:00:00
        (6/15): libmodulemd-1.6.3-1.el7.x86_64.rpm | 141 kB 00:00:00
        (7/15): librepo-1.8.1-7.el7.x86_64.rpm | 81 kB 00:00:00
        (8/15): libreport-filesystem-2.1.11-42.el7.centos.x86_64.rpm | 39 kB 00:00:00
        (9/15): libyaml-0.1.4-11.el7_0.x86_64.rpm | 55 kB 00:00:00
        (10/15): python-enum34-1.0.4-1.el7.noarch.rpm | 52 kB 00:00:00
        (11/15): libsolv-0.6.34-2.el7.x86_64.rpm | 328 kB 00:00:00
        (12/15): python2-hawkey-0.22.5-1.el7_6.x86_64.rpm | 68 kB 00:00:00
        (13/15): python2-libcomps-0.1.8-12.el7.x86_64.rpm | 47 kB 00:00:00
        (14/15): python2-dnf-4.0.9.2-1.el7_6.noarch.rpm | 414 kB 00:00:00
        (15/15): python2-libdnf-0.22.5-1.el7_6.x86_64.rpm | 608 kB 00:00:00
        ——————————————————————————————————————————————
        Total 1.0 MB/s | 2.9 MB 00:00:02
        Running transaction check
        Running transaction test
        Transaction test succeeded
        Running transaction
        Installing : librepo-1.8.1-7.el7.x86_64 1/15
        Installing : libsolv-0.6.34-2.el7.x86_64 2/15
        Installing : libcomps-0.1.8-12.el7.x86_64 3/15
        Installing : python2-libcomps-0.1.8-12.el7.x86_64 4/15
        Installing : python-enum34-1.0.4-1.el7.noarch 5/15
        Installing : deltarpm-3.6-3.el7.x86_64 6/15
        Installing : libreport-filesystem-2.1.11-42.el7.centos.x86_64 7/15
        Installing : dnf-data-4.0.9.2-1.el7_6.noarch 8/15
        Installing : libyaml-0.1.4-11.el7_0.x86_64 9/15
        Installing : libmodulemd-1.6.3-1.el7.x86_64 10/15
        Installing : libdnf-0.22.5-1.el7_6.x86_64 11/15
        Installing : python2-libdnf-0.22.5-1.el7_6.x86_64 12/15
        Installing : python2-hawkey-0.22.5-1.el7_6.x86_64 13/15
        Installing : python2-dnf-4.0.9.2-1.el7_6.noarch 14/15
        Installing : dnf-4.0.9.2-1.el7_6.noarch 15/15
        Verifying : libyaml-0.1.4-11.el7_0.x86_64 1/15
        Verifying : python2-libdnf-0.22.5-1.el7_6.x86_64 2/15
        Verifying : python2-libcomps-0.1.8-12.el7.x86_64 3/15
        Verifying : libreport-filesystem-2.1.11-42.el7.centos.x86_64 4/15
        Verifying : dnf-data-4.0.9.2-1.el7_6.noarch 5/15
        Verifying : deltarpm-3.6-3.el7.x86_64 6/15
        Verifying : libmodulemd-1.6.3-1.el7.x86_64 7/15
        Verifying : python2-hawkey-0.22.5-1.el7_6.x86_64 8/15
        Verifying : python-enum34-1.0.4-1.el7.noarch 9/15
        Verifying : python2-dnf-4.0.9.2-1.el7_6.noarch 10/15
        Verifying : libdnf-0.22.5-1.el7_6.x86_64 11/15
        Verifying : libsolv-0.6.34-2.el7.x86_64 12/15
        Verifying : librepo-1.8.1-7.el7.x86_64 13/15
        Verifying : libcomps-0.1.8-12.el7.x86_64 14/15
        Verifying : dnf-4.0.9.2-1.el7_6.noarch 15/15

        Installed:
        dnf.noarch 0:4.0.9.2-1.el7_6

        Dependency Installed:
        deltarpm.x86_64 0:3.6-3.el7 dnf-data.noarch 0:4.0.9.2-1.el7_6 libcomps.x86_64 0:0.1.8-12.el7
        libdnf.x86_64 0:0.22.5-1.el7_6 libmodulemd.x86_64 0:1.6.3-1.el7 librepo.x86_64 0:1.8.1-7.el7
        libreport-filesystem.x86_64 0:2.1.11-42.el7.centos libsolv.x86_64 0:0.6.34-2.el7 libyaml.x86_64 0:0.1.4-11.el7_0
        python-enum34.noarch 0:1.0.4-1.el7 python2-dnf.noarch 0:4.0.9.2-1.el7_6 python2-hawkey.x86_64 0:0.22.5-1.el7_6
        python2-libcomps.x86_64 0:0.1.8-12.el7 python2-libdnf.x86_64 0:0.22.5-1.el7_6

        Complete!
        [root@mini ~]# sudo dnf -y install dnf-plugins-core
        Extra Packages for Enterprise Linux 7 – x86_64 5.9 MB/s | 16 MB 00:02
        CentOS-7 – Base 2.7 MB/s | 10 MB 00:03
        CentOS-7 – Updates 5.7 MB/s | 7.7 MB 00:01
        CentOS-7 – Extras 721 kB/s | 366 kB 00:00
        Dependencies resolved.
        ==========================================================================================================================================
        Package Arch Version Repository Size
        ==========================================================================================================================================
        Installing:
        dnf-plugins-core noarch 4.0.2.2-3.el7_6 extras 51 k
        Installing dependencies:
        python-dateutil noarch 1.5-7.el7 base 85 k
        python2-dnf-plugins-core noarch 4.0.2.2-3.el7_6 extras 165 k

        Transaction Summary
        ==========================================================================================================================================
        Install 3 Packages

        Total download size: 301 k
        Installed size: 889 k
        Downloading Packages:
        (1/3): dnf-plugins-core-4.0.2.2-3.el7_6.noarch.rpm 361 kB/s | 51 kB 00:00
        (2/3): python-dateutil-1.5-7.el7.noarch.rpm 493 kB/s | 85 kB 00:00
        (3/3): python2-dnf-plugins-core-4.0.2.2-3.el7_6.noarch.rpm 703 kB/s | 165 kB 00:00
        ——————————————————————————————————————————————
        Total 406 kB/s | 301 kB 00:00
        Running transaction check
        Transaction check succeeded.
        Running transaction test
        Transaction test succeeded.
        Running transaction
        Preparing : 1/1
        Installing : python-dateutil-1.5-7.el7.noarch 1/3
        Installing : python2-dnf-plugins-core-4.0.2.2-3.el7_6.noarch 2/3
        Installing : dnf-plugins-core-4.0.2.2-3.el7_6.noarch 3/3
        Verifying : python-dateutil-1.5-7.el7.noarch 1/3
        Verifying : dnf-plugins-core-4.0.2.2-3.el7_6.noarch 2/3
        Verifying : python2-dnf-plugins-core-4.0.2.2-3.el7_6.noarch 3/3

        Installed:
        dnf-plugins-core-4.0.2.2-3.el7_6.noarch python-dateutil-1.5-7.el7.noarch python2-dnf-plugins-core-4.0.2.2-3.el7_6.noarch

        Complete!
        [root@mini ~]# sudo dnf -y copr enable konimex/neofetch
        Repository successfully enabled.
        [root@mini ~]# sudo dnf -y install neofetch
        Extra Packages for Enterprise Linux 7 – x86_64 0.0 B/s | 0 B 00:00
        Copr repo for neofetch owned by konimex 4.1 kB/s | 1.6 kB 00:00
        CentOS-7 – Base 0.0 B/s | 0 B 00:00
        CentOS-7 – Updates 0.0 B/s | 0 B 00:00
        CentOS-7 – Extras 0.0 B/s | 0 B 00:00
        Dependencies resolved.
        ==========================================================================================================================================
        Package Arch Version Repository Size
        ==========================================================================================================================================
        Installing:
        neofetch noarch 6.0.0-1.el7 konimex-neofetch 108 k

        Transaction Summary
        ==========================================================================================================================================
        Install 1 Package

        Total download size: 108 k
        Installed size: 397 k
        Downloading Packages:
        neofetch-6.0.0-1.el7.noarch.rpm 135 kB/s | 108 kB 00:00
        ——————————————————————————————————————————————
        Total 128 kB/s | 108 kB 00:00
        warning: /var/cache/dnf/konimex-neofetch-43a5b22a90d7b16e/packages/neofetch-6.0.0-1.el7.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID 4
        ee90675: NOKEY
        Copr repo for neofetch owned by konimex 0.0 B/s | 0 B 00:00
        Importing GPG key 0x4EE90675:
        Userid : “konimex_neofetch (None)
        Fingerprint: 2AAD A3D7 F8F2 788B 32DB 91BE 6DB1 CFBB 4EE9 0675
        From : https://copr-be.cloud.fedoraproject.org/results/konimex/neofetch/pubkey.gpg
        Key imported successfully
        Running transaction check
        Transaction check succeeded.
        Running transaction test
        Transaction test succeeded.
        Running transaction
        Preparing : 1/1
        Installing : neofetch-6.0.0-1.el7.noarch 1/1
        Verifying : neofetch-6.0.0-1.el7.noarch 1/1

        Installed:
        neofetch-6.0.0-1.el7.noarch

        Complete!
        [root@mini ~]# neofetch
        .. root@mini
        .PLTJ. ———
        <><><><> OS: CentOS Linux 7 (Core) x86_64
        KKSSV’ 4KKK LJ KKKL.’VSSKK Host: VMware Virtual Platform None
        KKV’ 4KKKKK LJ KKKKAL ‘VKK Kernel: 3.10.0-957.5.1.el7.x86_64
        V’ ‘ ‘VKKKK LJ KKKKV’ ‘ ‘V Uptime: 2 mins
        .4MA.’ ‘VKK LJ KKV’ ‘.4Mb. Packages: 373 (rpm)
        . KKKKKA.’ ‘V LJ V’ ‘.4KKKKK . Shell: bash 4.2.46
        .4D KKKKKKKA.” LJ ”.4KKKKKKK FA. Terminal: /dev/pts/0
        CPU: Intel i5-7200U (4) @ 2.712GHz
        ‘VD KKKKKKKK’.. LJ ..’KKKKKKKK FV GPU: VMware SVGA II Adapter
        ‘ VKKKKK’. .4 LJ K. .’KKKKKV ‘ Memory: 103MiB / 216MiB
        ‘VK’. .4KK LJ KKA. .’KV’
        A. . .4KKKK LJ KKKKA. . .4
        KKA. ‘KKKKK LJ KKKKK’ .4KK
        KKSSA. VKKK LJ KKKV .4SSKK
        <><><><>
        ‘MKKM’

        [root@mini ~]#

Leave a Reply

%d bloggers like this: