/ factorpad.com / tech / linux-essentials / clear-command.html
An ad-free and cookie-free website.
Beginner
Learn to erase the terminal screen at the Linux command line.
Videos can also be accessed from the Linux Essentails Playlist on YouTube.
Linux clear Command Summary with Examples (3:17)
Our third word, or command to memorize is clear
from the category Navigation.
clear
allows you to clear the
terminal screen. Recall from our last video, our terminal screen
got a little messy as we printed help files using the whatis
command. Well, clear will help us
here.
-options | description |
---|---|
|
There are no options |
If it helps, think of commands as mini programs and most have this
structure. First, type the
command
, second the
option(s)
and third the
argument(s)
.
The clear
command interestingly has
no options and no arguments. Its one
purpose is to clear the screen. In
the terminal you shouldn't expect things to look pretty; quite the
opposite actually. But every once in a while you need to change gears
and clear the clutter, and to do so type clear
and Enter.
So why is clear
an important command?
Well, it's the essential command to keep your terminal window tidy.
And now you know how to do that.
Okay, the best way to embed this in your memory is by typing in your own terminal window.
Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows 10.
Here we go, let's borrow a command from the previous video and fill up
our screen, type whatis -h
with no
arguments, Enter and look, the 13 available options for the
whatis
command.
Next, to clear the screen type
clear
Enter and there you go.
Okay now you know how to use clear
.
And you know the syntax for commands, options and arguments.
One last tip about the clear
command.
We'll talk more about aesthetics later, for example, your command
prompt may not look as simple as mine so I'll show you how to
customize this later.
Okay, thanks for visiting today. I hope this was a fun introduction
to the clear
command.
For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:
Make sure you don't miss new content, subscribe at YouTube and follow @factorpad on Twitter. Plus, our no-spam email list is always an option.
whatis
command,
hit Back.man
, click
Next./ factorpad.com / tech / linux-essentials / clear-command.html
A newly-updated free resource. Connect and refer a friend today.