[Code Example] Clear Ubuntu terminal or WSL without clearing history


In this article we will provide your code for clearing Ubuntu terminal or WSL windows command line without clearing history. Use clear command with -x attribute.

Note: Remember to use lowercase x.

Code Example –

[email protected]: clear -x
clear -x to clear the terminal but preserving the history

Sign Up for Our Newsletters

Get only the best articles delivered to your mail

You May Also Like