본문으로 바로가기

[RHEL/CentOS 8] neofetch 설치

category Linux/RHEL7 & 8 2021. 10. 7. 13:47
반응형

이 가이드는 Neofetch를 사용하여 Linux 시스템 정보를 표시하는 방법에 대한 내용입니다.

Neofetch는 Bash로 작성된 크로스 플랫폼, 오픈 소스 명령줄 시스템 정보 유틸리티로 시스템의 소프트웨어 및 하드웨어에 대한 정보를 수집하고 터미널에 결과를 표시해줍니다.

 

아래 가이드는 RHEL 8.4에서 작성되었습니다.

 

 

1.  epel-release repository 설치

[root@hk-tb ~]#yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Failed to set locale, defaulting to C.UTF-8
Updating Subscription Management repositories.
Last metadata expiration check: 0:37:30 ago on Thu Oct  7 10:56:04 2021.
epel-release-latest-8.noarch.rpm                                                                                                        16 kB/s |  23 kB     00:01
Dependencies resolved.
=======================================================================================================================================================================
 Package                                   Architecture                        Version                                 Repository                                 Size
=======================================================================================================================================================================
Installing:
 epel-release                              noarch                              8-13.el8                                @commandline                               23 k

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

Total size: 23 k
Installed size: 35 k
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                               1/1
  Installing       : epel-release-8-13.el8.noarch                                                                                                                  1/1
  Running scriptlet: epel-release-8-13.el8.noarch                                                                                                                  1/1
  Verifying        : epel-release-8-13.el8.noarch                                                                                                                  1/1
Installed products updated.

Installed:
  epel-release-8-13.el8.noarch

Complete!

 

 

2. neofetch 설치

[root@hk-tb ~]#dnf install neofetch
Failed to set locale, defaulting to C.UTF-8
Updating Subscription Management repositories.
Extra Packages for Enterprise Linux Modular 8 - x86_64                                                                                 449 kB/s | 956 kB     00:02
Extra Packages for Enterprise Linux 8 - x86_64                                                                                         2.9 MB/s |  10 MB     00:03
Last metadata expiration check: 0:00:01 ago on Thu Oct  7 11:33:48 2021.
Dependencies resolved.
=======================================================================================================================================================================
 Package                                             Architecture          Version                               Repository                                       Size
=======================================================================================================================================================================
Installing:
 neofetch                                            noarch                7.1.0-1.el8                           epel                                             94 k
Installing dependencies:
 ImageMagick-libs                                    x86_64                6.9.10.86-1.el8                       epel                                            2.3 M
 LibRaw                                              x86_64                0.19.5-2.el8                          rhel-8-for-x86_64-appstream-rpms                316 k
 
 < 중략 >
 
Complete!

 

 

3. neofetch 실행

Linux 시스템 정보를 표시하려면 터미널에서 다음 명령을 실행하면 됩니다.

[root@hk-tb ~]#neofetch
           .MMM..:MMMMMMM                  root@hk-tb
          MMMMMMMMMMMMMMMMMM               ----------
          MMMMMMMMMMMMMMMMMMMM.            OS: Red Hat Enterprise Linux 8.4 (Ootpa) x86_64
         MMMMMMMMMMMMMMMMMMMMMM            Host: PowerEdge R740
        ,MMMMMMMMMMMMMMMMMMMMMM:           Kernel: 4.18.0-305.19.1.el8_4.x86_64
        MMMMMMMMMMMMMMMMMMMMMMMM           Uptime: 50 mins
  .MMMM'  MMMMMMMMMMMMMMMMMMMMMM           Packages: 526 (rpm)
 MMMMMM    `MMMMMMMMMMMMMMMMMMMM.          Shell: bash 4.4.20
MMMMMMMM      MMMMMMMMMMMMMMMMMM .         Resolution: 1024x768
MMMMMMMMM.       `MMMMMMMMMMMMM' MM.       Terminal: /dev/pts/0
MMMMMMMMMMM.                     MMMM      CPU: Intel Xeon Gold 6240 (72) @ 3.900GHz
`MMMMMMMMMMMMM.                 ,MMMMM.    GPU: 03:00.0 Matrox Electronics Systems Ltd. Integrated Matrox G200eW3 Graphics Controller
 `MMMMMMMMMMMMMMMMM.          ,MMMMMMMM.   Memory: 1926MiB / 385317MiB
    MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
      MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM:
         MMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
            `MMMMMMMMMMMMMMMMMMMMMMMM:
                ``MMMMMMMMMMMMMMMMM'

 

 

4. ssh 접속시 자동으로 neofetch 실행

터미널 세션을 열 때마다 Neofetch를 자동으로 실행하게 하려면 ~/.bashrc 에 추가합니다.

[root@hk-tb ~]#vi ~/.bashrc
# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias vi='vim'

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

neofetch

 

 

5. ssh 및 neofetch 자동실행 확인

ssh 터미널에 접속해서 자동으로 시스템 정보가 나타나는지 확인해봅니다.

 

 

6. neofetch 설정변경 가이드

기본 설정외에 neofetch 명령을 통해 나타내는 정보를 on/off 할 수 있습니다.

혹은 config.conf에서도 default 설정 값을 변경할 수 있습니다.

Disable info name:
You can exclude some details from output. For example, the following command will exclude the CPU details:

$ neofetch --disable cpu
If you want to exclude multiple information, just specify them with space-separated like below:

$ neofetch --disable cpu memory

Hide/Show OS architecture:
$ neofetch --os_arch off
$ neofetch --os_arch on

Enable/Disable CPU brand:
$ neofetch --cpu_brand on
$ neofetch --cpu_brand off

Display number CPU cores:
$ neofetch --cpu_cores logical
$ neofetch --cpu_cores physical

Hide/Show cpu speed:
$ neofetch --cpu_speed off
$ neofetch --cpu_speed on

Hide/Show cpu temperature:
Display CPU temperature in celsius (C):
$ neofetch --cpu_temp C

Display temperature in fahrenheit (F):
$ neofetch --cpu_temp F

Show/Hide GPU brand:
To enable or disable GPU brand (intel, amd), run:
$ neofetch --gpu_brand on
$ neofetch --gpu_brand off

Show/Hide SHELL path:
$ neofetch --shell_path on
$ neofetch --shell_path off

Show/Hide SHELL version:
$ neofetch --shell_version on
$ neofetch --shell_version off

$ neofetch --help
Configure Neofetch
When we run the Neofetch for the first time, It will create a per-user configuration file at $HOME/.config/neofetch/config.conf by default. 
You can tweak this file to tell Neofetch which details should be displayed, removed and/or modified.

 

728x90