Different ways to clear screen in Linux ?

Today we will look the different ways to clear screen in linux.

1. Clear Command

[root@nglinux ~]# clear


2. Ctrl+L shortkey
It has similar effect as of clear command.

3. Reset command
You will not able to see this command in command history as it resets the terminal

[root@nglinux ~]# reset


4. printf clear screen shortcode.

[root@nglinux ~]# printf "\033c"


Linux commands in the backend uses the terminal commands like tput and terminfo for resetting or clearing the screen.

Hence we can clear the screen using these command options as well.


TPUT Command to clear screen

# tput reset
# tput -T5620 reset      --> Reset AT&T 5620 terminal, 
## overrides type of terminal in the environmental variable TERM.


Another interesting command to edit our terminal session options is as seen below.

How tput can be used to clear screen and make the text bold ?


0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments