0
How to clear the terminal in linux?
about linux
4 Réponses
+ 15
I use the 'clear' command.
+ 5
ctrl + L
+ 5
~~~ Addendum to Maz:
vi ~/.bash_aliases (or ~/.bashrc)
alias c=clear
: wq
$ c
~~~Addendun to Salekin:
L is the 12th letter; send ASCII 12 to some terminals (and printers; it's a form feed), they clear.
You might have to press Ctrl-V first, then Ctrl-L.
Ctrl-V forces the shell NOT to interpret the next thing you type (it's how you send tabs, bells etc)
~~~ ANSI escape sequences. Search Q&A. or...
$ echo ^[[2J
# That's: echo Ctrl-V Ctrl-[ [ 2 J Enter
ANSI can also put your cursor at 1,1 (not shown)
~~~ When nothing else works
Print many blank lines. It leaves the cursor at the bottom (foiling Ctrl-PgUp scrollback) but if it's all you have...