LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-20-2012, 09:39 PM   #1
Arcosanti
Member
 
Registered: Apr 2004
Location: Mesa, AZ USA
Distribution: Slackware 14.1 kernel 4.1.13 gcc 4.8.2
Posts: 246

Rep: Reputation: 22
Why no cls or some other clear screen command for the shell?


I have always wondered why there is no cls or a similar clear screen command available for the shell in Linux, liker there is in DOS.
 
Old 08-20-2012, 09:43 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726

Rep: Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706
Hi,

have you tried, "reset" or "clear"?

Evo2.
 
Old 08-20-2012, 09:43 PM   #3
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
There is, it is called "clear"
 
Old 08-20-2012, 10:46 PM   #4
Arcosanti
Member
 
Registered: Apr 2004
Location: Mesa, AZ USA
Distribution: Slackware 14.1 kernel 4.1.13 gcc 4.8.2
Posts: 246

Original Poster
Rep: Reputation: 22
Thanks for that info. I tried both and they worked. I think I'll make a symlink called cls and point it at clear since it is faster.
 
Old 08-20-2012, 11:10 PM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
You don't need a symlink, just set up an alias. Why go for three characters anyway? Just set an alias so that c=clear.
 
Old 08-20-2012, 11:12 PM   #6
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
Quote:
Originally Posted by Arcosanti View Post
Thanks for that info. I tried both and they worked. I think I'll make a symlink called cls and point it at clear since it is faster.
Note that while both will clear the terminal screen, they are indeed two very different commands.

reset initializes the terminal, part of which is to clear the screen.
clear simply clears the terminal screen.

If you simply want to clear the screen, use clear. If your screen becomes garbled and chars are not displayed properly, then use the reset command.

See the manpages of both commands for more info.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Keeps typing CLS instead of clear? Well here is your fix... Master_CAPS Linux - Newbie 36 03-22-2012 09:26 AM
Clear Screen Command for BASH Shell erora Linux - Newbie 3 01-21-2010 09:03 PM
cls command esmaili.fateme Linux - Newbie 2 04-16-2009 01:37 AM
Problem with clear screen command unni krishnan Linux - Software 1 02-28-2008 03:31 AM
how do i replace the clear "clear screen" with the cls command thefedexguy SUSE / openSUSE 2 12-02-2005 05:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration