0

How to clear the terminal in linux?

about linux

13th Aug 2017, 3:29 PM
Shivam Shukla
Shivam Shukla - avatar
4 odpowiedzi
+ 15
I use the 'clear' command.
13th Aug 2017, 3:46 PM
Maz
Maz - avatar
+ 5
ctrl + L
13th Aug 2017, 3:38 PM
Salekin
Salekin - avatar
+ 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...
13th Aug 2017, 8:26 PM
Kirk Schafer
Kirk Schafer - avatar