Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Hush your terminal login UNIX
If you use the Terminal quite a bit, you might appreciate being able to eliminate some of the text that appears when you open a new Terminal window, before you even get to type anything. Type:
touch ~/.hushlogin
When you hit return, this creates an empty file in your home directory called .hushlogin, which is a flag for the system to not show the Message Of The Day ("Welcome to Darwin!" is the default), and to not show your last login time.

You should find yourself simply dropped off at a prompt.
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)

Hush your terminal login | 9 comments | Create New Account
Click here to return to the 'Hush your terminal login' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
yeh I guess
Authored by: macubergeek on Aug 15, '02 11:08:08AM

you could also just do:
sudo cat /dev/null>/etc/motd
and zero out the motd file altogether and
accomplish the same thing

[ Reply to This | # ]
You should change the motd anyway...
Authored by: imacusr on Aug 15, '02 12:25:13PM
if you work at a government site. this is what our security page at NIH has to say about them:
The NIH CIO issues the following NIH policy regarding warning banner use and management. Employee "sign-on warning banners" must be posted at all logon points to Government computers and systems where technically practical. Further, this policy must be included in all orientation materials for new/transferring users. The OGC had advised that, according to the Department of Justice (DOJ), such banners are not legally required but may facilitate prosecution of intruders to a computer network by obtaining consent for keystroke monitoring; DOJ recommends that a banner appear whenever an employee logs onto an agency computer. This recommendation has been strengthened based on recent advice from the Office of Inspector General that "prosecution of employees and contractors for misuse of government computers may be warranted providing the government can prove that the employee or contractor's job performance suffered as a result of their activities and the employee or contractor was advised of the proper uses of the computer....use of a properly placed sign-on warning would suffice as proper advisement." In addition to potential legal considerations, the use of banners is a good management and security practice. It is important that staff clearly understand that use of government computers is subject to monitoring, and that there can be no expectation of personal privacy.
My understanding is that even if your computer is your own, you should at least remove the word "welcome"; that way, you have an extra legal backup if you decide to prosecute somebody for hacking your machine.

[ Reply to This | # ]
You should change the motd anyway...
Authored by: mervTormel on Aug 15, '02 01:02:38PM

yep. imacusr's got the skinny here. it is a shame we have become such a litigous society, but that is the case. if you have a welcome in your motd, consider any legal recourse for user transgressions after login a dead end.

you need a stern warning, and a method for guaranteeing that the motd is cat'd to every login even if there is a ~/.hushlogin...

put the following in all the login startup scriptage in /etc/

cat /etc/motd

example /etc/motd :


Unauthorized Access Is Strictly Prohibited.

Your activity is being logged. You have been warned.

If you are here by mistake, type exit now.


[ Reply to This | # ]
You should change the motd anyway...
Authored by: VEGx on Aug 16, '02 02:18:26PM

get a life :)

[ Reply to This | # ]
You should change the motd anyway...
Authored by: BraindeadMac on Aug 15, '02 05:48:04PM

Oh give me a ****ing break. Change the MOTD to something you enjoy if you want.

[ Reply to This | # ]
You should change the motd anyway...
Authored by: maclaxguy on Aug 18, '02 06:28:32PM

Amen, man. A - ****ing - men

[ Reply to This | # ]
Happy medium
Authored by: ihafro on Aug 17, '02 11:37:15PM

How about you do both, ward off people (a.k.a. scare the hell out of them) and have fun. How about this one:

Weasel's rip my flesh.....RIZZ
If you aren't supposed to be here this may happen to you. Type exit and git off my propery!! You have been warned!

Well, what do you think? How long before it becomes a standard ;)

[ Reply to This | # ]
touch ~/.hushlogin
Authored by: soul7 on Aug 20, '02 12:07:01PM

How can I restore his login appear "Welcome to Darwin!" Can anyone tell me how to restore it?

I have tried it and I liked for a while, now I want it back on.

[ Reply to This | # ]
Remove and create...
Authored by: robg on Aug 26, '02 08:36:39AM

If you didn't touch the /etc/motd file, just delete .hushlogin and you're done. If you did delete /etc/motd, use "sudo vi /etc/motd" (replace 'vi' with the editor of your choice) to create a new one.


[ Reply to This | # ]