(1) clear
This command will refresh the screen, essentially just scrolling the terminal display back one page. If you scroll up, you can still see the previous operation information. This command is commonly used.
(2) ctrl+l (equivalent to clear)
(3) reset
This command will completely refresh the terminal screen, clearing all previous terminal input operation information. Although this makes the screen look clean, the entire command process is a bit slow, so it is used less frequently.
(I tested it myself and found that the effect is equivalent to the previous command, but it was difficult because I originally wanted to use this method.)
(4) Additionally, I will introduce a method of using an alias to execute the clear command, as follows:
[root@localhost ~]$ alias cls='clear'
[root@localhost ~]$ cls
After executing the above commands, you can directly enter the cls command in the future to achieve the same clear command as clear.
Of course, the alias command is used to set aliases for instructions. We can use this command to simplify some longer commands. The effect of the alias command is only limited to the current login operation. If you want to use these command aliases every time you log in, you can store the corresponding alias commands in the bash initialization file /etc/bashrc.