Sometimes it is necessary to clear the terminal window of the text to get started, so to speak, from scratch. Consider 5 different ways to clear the terminal.
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
The reset command is used to return the terminal to its original state.
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.
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:
If you run the printf “\\033c” command in the terminal, the terminal window is cleared.
May the Force be with you,