In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to clear the terminal screen of Ubuntu and other Linux distributions, which has a certain reference value, and interested friends can refer to it. I hope you can learn a lot after reading this article.
Use the clear command to clear the Linux terminal
So, how do I clear the terminal in Linux? The simplest and most common method is to use the clear command:
Clear
The clear command requires no options. It's that simple, but there's something else you need to know.
The clear command and other ways to clear the screen may depend on the terminal emulator you use. A terminal emulator is a terminal application that accesses Linux Shell (command line).
If you use the clear command on a Ubuntu with a GNOME terminal, it will clear the screen and you will not be able to see what was previously on the screen.
In many other terminal emulators or Putty, it may clear only one page of the screen. If you scroll with the mouse or PageUp and PageDown keys, you can still see the previous screen output.
Frankly, it depends on your needs. If you suddenly realize that you need to refer to the output of a previously run command, you may want to use this method.
Other ways to clear the terminal screen in Linux
The clear command is not the only way to clear the terminal screen.
You can use Ctrl+L keyboard shortcuts in Linux to clear the screen. It is suitable for most terminal simulators.
Ctrl+L
If you use the Ctrl+L and clear commands in the GNOME terminal (the default in Ubuntu), you will notice that their effects are different. Ctrl+L moves the screen down one page, giving the illusion of cleanliness, but you can still access the command output history by scrolling up.
Some other terminal emulators set this keyboard shortcut to Ctrl+Shift+K.
You can also use the reset command to clear the terminal screen. In fact, this command performs a complete terminal reinitialization. However, it may take longer than the clear command.
Reset
When you want to clear the screen completely, there are several other complex ways to clear the screen. But because the command is a bit complex, it's best to use it as an alias in Linux:
Alias cls='printf "\ 033c"'
You can add this alias to your bash configuration file for use as a command.
Thank you for reading this article carefully. I hope the article "how to clear the Terminal screen of Ubuntu and other Linux distributions" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 247
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
Operating System: Red Hat Enterprise Linux Server 7.3 (Maipo) IPADDR:10.10.0.123 =
© 2024 shulou.com SLNews company. All rights reserved.