Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-08-2006, 07:53 AM   #1
Registered: Jan 2005
Distribution: Debian
Posts: 104

Rep: Reputation: 15
clear screen on console logout

I was wondering, is it possible to automatically clear the screen when you logout from the console? It's a littel irratating to see the commands your typed after logout.
I was thinking of modifying some script (if this is how you do it in linux....)
Old 02-08-2006, 09:29 AM   #2
Wim Sturkenboom
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Have you tried something in a script called .bash_logout?

google search
Old 02-09-2006, 12:43 AM   #3
Registered: Jan 2005
Distribution: Debian
Posts: 104

Original Poster
Rep: Reputation: 15
sorry, I can't find information of where to put that file.
Also, if I put it in my home dir doesn't in only affect one user? How do I make it global?
Old 02-09-2006, 12:47 AM   #4
Registered: Aug 2005
Location: The Glorious People's Republic of Austin
Posts: 158

Rep: Reputation: 26
why not just type
clear && logout
Old 02-09-2006, 01:12 AM   #5
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
you could create an alias for exit or logout in .bashrc e.g.
alias exit="clear && logout"
an alternative is
alias exit="reset && logout"
Old 02-09-2006, 05:22 AM   #6
Senior Member
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Blog Entries: 4

Rep: Reputation: 57
This can be done globally in /etc/issue as well.
Old 02-09-2006, 05:34 AM   #7
Registered: Jan 2005
Distribution: Debian
Posts: 104

Original Poster
Rep: Reputation: 15
doing clear > /etc/issue worked.


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
how do i replace the clear "clear screen" with the cls command thefedexguy SUSE / openSUSE 2 12-02-2005 05:02 PM
clear the console tamtam Programming 2 12-07-2004 05:34 PM
How do I get the screen to clear on logout? muxman Debian 1 12-02-2004 02:13 AM
how to clear screen in C ? indian Programming 3 10-01-2004 10:58 PM
Clearing the tty console screen on logout koyi Linux - General 8 07-30-2004 11:32 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:17 AM.

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