• Contact Us
  • copyright
  • About Us
  • Privacy Policy
  • Devops
  • Linux
Globedrill

clear command not found. Install Clear on CentOS 8

Linux/30 May, 20/5665/0
Linux

clear command not found. Install Clear on CentOS 8 and RHEL 8 server

 

Follow the below steps to fix clear command not found error on CentOS 8 and Redhat 8 server.

[root@server /]# clear
bash: clear: command not found

bash: /usr/bin/clear: No such file or directory

I got the above error on my CentOS 8 server. Clear command is used on Linux servers to clear the terminal screen.

On CentOS servers, clear command is provided by ncurses package and it might not be installed.

1. You must log into your CentOS 8 or RHEL 8 server as ‘root’ or sudo user

2. Run the below command to check whether ‘ncurses’ package is installed or not
 

# rpm -qa | grep ncurses

 
3. Install ‘ncurses’ package using yum command
 

# yum install ncurses

 
4. Enter ‘y’ and press enter, if yum ask for confirmation.
 

 
5. Verify whether it is installed correctly

Type ‘clear’ command to clear the screen. Run the following command to verify installation by checking ncurses version.
 

[root@server /]# clear -V
ncurses 6.1.20180224

 
 

How to download and install ncurses rpm

 
1. Log into your CentOS 8 / Redhat 8 server as ‘root’ user

2. Download ncurses package from CentOS website using wget command
 

# wget http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/ncurses-6.1-7.20180224.el8.x86_64.rpm

 
3. Install the downloaded rpm file using either yum or rpm command

(a) Install on CentOS 8 x86_64 server using yum command :
 

# yum install ncurses-6.1-7.20180224.el8.x86_64.rpm

 
yum will install ncurses package and the required dependencies

(b) Install on CentOS 8 x86_64 server using rpm command :
 

# rpm -ivh ncurses-6.1-7.20180224.el8.x86_64.rpm

 
You must download and install the dependencies if you are installing using rpm
command.
 
 

Clear command usage

 
Usage: clear [options]

Options:
-T TERM use this instead of $TERM
-V print curses-version
-x do not try to clear scrollback

.

About Us

Globedrill.com is a website that publishes articles related to Linux and Devops. Globedrill was started on April 2016.

Contact Us

Email : globedrill.c@gmail.com

Globedrill

Copyright © 2016 Globedrill. All Rights Reserved. The content in this website is copyrighted to Globedrill.com and may not be republished either online or offline.

  • About Us
  • Privacy Policy
  • Contact Us
  • copyright