The clear of the Linux command I used-clear the terminal screen, not the CLS

Source: Internet
Author: User

Original link: http://codingstandards.iteye.com/blog/804213

Description of Use

The clear command is used to clear the terminal screen (clear the terminal screens), people who have used DOS or Windows cmd know that there is a CLS command that can be used to clear the screen, but there is no command under Linux, We can make the Linux system also have this CLS command by using aliases. In addition, press CTRL+L can also achieve the same effect, when we use Vi/vim to edit the file, if the screen display is a bit confusing, you can also press Ctrl+l to make the screen display back to normal.

Common Parameters

No.

If you want the input CLS to clear the screen, add a line at the end of the/etc/profile:

Alias Cls=clear

You can enter the CLS to achieve the clear command when you log in again after saving.

Of course, the quicker way is to hold down the CTRL key and then press L again.

using the exampleexample one using the clear command to clear the screen

[Email protected] ~]#
[Email protected] ~]#
[Email protected] ~]#
[Email protected] ~]#
[Email protected] ~]# Clear






[Email protected] ~]#

example two using Ctrl+l to clear the screen

[Email protected] ~]#
[Email protected] ~]#
[Email protected] ~]#
[Email protected] ~]#
[Email protected]web ~]# ctrl+l






[Email protected] ~]#

example Two creating aliases enables the CLS to also clear the screen

[[Email protected] ~]# CLS
-bash:cls:command not found
[[email protected] ~]# alias Cls=clear
[[Email protected] ~]# CLS

The clear of the Linux command I used-clear the terminal screen, not the CLS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.