MintGuide.org / How to clean a Linux terminal

How to clean a Linux terminal


CLEAR
The clear command clears the terminal window. In fact, the output of the previous commands in the terminal is not deleted, just the command line is moved to the first line of the terminal, and under it you get a clean space.
The easiest command to remember
clear
RESET
The reset command is used to return the terminal to its original state.
reset
For example, if after executing a program you try to enter a command in the terminal, but not the characters you press are entered. In this case, the reset command will restore the terminal to its original state. Also, after executing this command, the terminal window is cleared.
Ctrl+L
One of the quickest and easiest ways to clear a terminal is to press Ctrl+L.
The Ctrl+L action is similar to the clear command.
[banner_inside-articles]{banner_inside-articles}[/banner_inside-articles]
CLEAR && CLEAR
If you run the clear command once, the terminal window will be cleared, but if there was a lot of text in it before, you can use the scroll and view this text. If you run the clear command again, the previous output in the terminal window is cleared. To avoid typing clear twice, you can run:
clear && clear
PRINT "\033c"
If you run the printf "\033c" command in the terminal, the terminal window is cleared.
printf "\033c"
Code 033 (octal notation) corresponds to the ASCII code of the Esc-sequence. Entering the Esc-sequence +c in the terminal resets the terminal to its original state (similar to the reset command).
May the Force be with you,
Good Luck!!!
25-01-2019, 05:46
Go Back