Linux Terminal completely clears the screen

Source: Internet
Author: User
Linux users are basically used to clearing terminal screens by using the clear command or Ctrl & amp; 43; L combination of shortcuts. In fact, this is not true.

Linux users are basically used to clearing terminal screens by using the clear command or Ctrl + L combination shortcut keys. In fact, the screen is not really cleared, but when you scroll up with the mouse, you can still see the output of the previous command operation.

The command printf "\ 033c" or printf "\ ec" truly clears the terminal screen.

How does it work? \ 033 = \ x1B = 27 = ESC so this command becomes c, which is the escape code in the VT-XXX that represents "Full Reset (RIS. Printf is a built-in command in bash, which has a higher priority than other executable files.

Reset also truly clears the terminal screen. This command is executed slowly, but its compatibility is obviously better than the previous one. The reset command is useful when your terminal is out of control.

Related Article

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.