Showing posts with label how to clear the terminal screen in linux. Show all posts
Showing posts with label how to clear the terminal screen in linux. Show all posts

Friday, March 15, 2013

Linux command: clear



Linux command: clear


how to clear the terminal screen in linux, How to clear terminal window in Linux

The `clear` command is one of the most handy commands to know if you are a command line user in Linux. As you are moving through directories, `cat`ing files, or any number of standard tasks, your terminal will get filled up with a bunch of prior commands and output. If you want to start from a blank slate, but don't want to log out and log back in, then using `clear` will become a handy tool.

The clear command does not affect files or jobs, it simply clears the clutter from your terminal screen. Another nice thing about `CLEAR` is that it doesn't erase your terminal scroll buffer, so if you need to see something that was on your screen a while ago, you can still use your mouse wheel to scroll back.


Usage
clear

 


or this handy shortcut.

CTRL - l

 

(that's a lowercase L)

Another way that you can use `CLEAR` is when you are in a text editor (like emacs), and want to re-orient your screen so that your cursor is in the middle of the screen. Oftentimes I am writing a bit of code, and end up at the bottom of the screen, and find it hard to look at, so I just hit `ctrl-l`, and my code is now nicely positioned in the middle of the screen.

Linux command: clear



Linux command: clear


how to clear the terminal screen in linux, How to clear terminal window in Linux

The `clear` command is one of the most handy commands to know if you are a command line user in Linux. As you are moving through directories, `cat`ing files, or any number of standard tasks, your terminal will get filled up with a bunch of prior commands and output. If you want to start from a blank slate, but don't want to log out and log back in, then using `clear` will become a handy tool.

The clear command does not affect files or jobs, it simply clears the clutter from your terminal screen. Another nice thing about `CLEAR` is that it doesn't erase your terminal scroll buffer, so if you need to see something that was on your screen a while ago, you can still use your mouse wheel to scroll back.


Usage
clear

 


or this handy shortcut.

CTRL - l

 

(that's a lowercase L)

Another way that you can use `CLEAR` is when you are in a text editor (like emacs), and want to re-orient your screen so that your cursor is in the middle of the screen. Oftentimes I am writing a bit of code, and end up at the bottom of the screen, and find it hard to look at, so I just hit `ctrl-l`, and my code is now nicely positioned in the middle of the screen.