clear command not found. Install Clear on CentOS 8
clear command not found. Install Clear on CentOS 8 and RHEL 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
3. Install ‘ncurses’ package using yum command
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.
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
3. Install the downloaded rpm file using either yum or rpm command
(a) Install on CentOS 8 x86_64 server using yum command :
yum will install ncurses package and the required dependencies
(b) Install on CentOS 8 x86_64 server using rpm command :
You must download and install the dependencies if you are installing using rpm
Clear command usage
Usage: clear [options]
-T TERM use this instead of $TERM
-V print curses-version
-x do not try to clear scrollback