Indiana University
University Information Technology Services
  
What are archived documents?

In Unix, how do you turn off the banner?

To turn off the banner in Unix, create a special file in your login directory called .hushlogin. At your Unix shell prompt, enter:

touch .hushlogin

Caution: The banner includes important information such as policy and downtimes. If you create a .hushlogin file, you will never see this information. The banner is stored in a file called /etc/motd. (Motd stands for "message of the day"). To see the banner, at your Unix shell prompt, enter:

more /etc/motd

The banner message does not change very often. If you are using csh or tcsh and would prefer to know when the message has been changed so that you can read it at that time, add the following lines to your .login file:

cmp -s ${HOME}/.hushlogin /etc/motd if ($status) then tee ${HOME}/.hushlogin < /etc/motd echo -n "Press Enter to continue: " && $< endif

If you are using sh, ksh, or bash, you need to put the following lines in your .profile (or .bash_profile for bash):

cmp -s $HOME/.hushlogin /etc/motd if [ $? != 0 ]; then tee $HOME/.hushlogin < /etc/motd echo -n "Press Enter to continue: " && read ans fi

These lines compare the current banner with the one you saw the last time you logged in (as saved in your .hushlogin file). If they differ, you'll see the updated banner and be prompted to press the Enter key to continue.

At Indiana University, to get support for personal or departmental Linux or Unix systems, see At IU, how do I get support for Linux or Unix?

This is document acdd in domain all.
Last modified on August 22, 2008.
Please tell us, did you find the answer to your question?