[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to clear console before login promtp ?



Brad said:
> This was posted a while back on the list. i forget who or when though...
> 
>   # mv /etc/issue /etc/issue.old
>   # clear > /etc/issue
>   # cat /etc/issue.old >> /etc/issue

Assuming you're using bash as your shell, a much simpler option is to just
create a file in your home directory named .bash_logout (other shells use
.logout or other variations on the same theme) containing the command

clear

You'll probably also want to copy that file into /etc/skel so that it will
automatically be added to the home directories of any new users.

(These two methods are not actually equivalent.  Changing /etc/issue will
make a system-wide change which is not overridable by users, but may not
work as expected if someone uses a terminal with more lines on the display
than expected.  Adding the command to the user's logout file will, obviously,
only work on a user-by-user basis and can be turned off by individual users
if they don't want the screen to clear when they logout, but should always
work regardless of terminal geometry.)


Reply to: