Change the Mac OS X Terminal’s Message of the Day
Whenever you launch the Terminal in Mac OS X, you get a little message: “Welcome to Darwin!” – well, after you’ve seen it a few hundred times you might be sick of it, or perhaps you’d prefer something more useful to yourself and other computer users. There is no rocket science with this at all, its called a Message of the Day and it’s a simple text file located at /etc/motd. We will show you how to change it to whatever you want, easily.
Launch the Terminal and type:
$ cat /etc/motd
Unless you have already customized it, “Welcome to Darwin!” will be what appears. But we don’t want that anymore, so here’s how to turn it into whatever you want.
Type the following:
$ nano /etc/motd
nano is nothing more than a command line text editor, and works just like one. Line over and delete the text and type whatever you want in its place.

To save you’ll hit control-O, and then hit return. That’s it. Now when you launch the Terminal you’ll be greeted with your new message.
Hello from OS X Daily!
Mac~$
Note: It has come to our attention that some users will be required to run nano as root, via the sudo command. Using the sudo command will prompt you for the administrators password. The new syntax would be: $ sudo nano /etc/motd

another great tip!
Hah…it’s great…i changed it to “don’t terminate my terminal”….
It didn’t work for me. I get the message “Could not open file for writing: Permission denied”. Do I have to be logged in as root? I have admin privileges with my regular login.
Mario,
I don’t think you’re alone. Try adding the ‘sudo’ command to the sequence in front of nano. This would make the new command be:
sudo nano /etc/motd
It will prompt you for the administrator password, which allows you to edit the file by running nano as root. Hope that helps you and others.
Also, you can quit nano by hitting control-X
Thanks, Ivan. I suspected I needed to type sudo before the command, but I wasn’t sure.
is there a way to get rid of the “last login” message as well?
hi, could any one tell me What “Sudo nano” means?
Thanks
Joel,
‘sudo nano’ is a command that runs the nano text editor as the super user root (or system administrator), thus allowing you to edit the /etc/motd file
In case anyone is still wondering, this how to get rid of the “Last login:” message. Run `touch .hushlogin` in your home folder.
ok. i customized the motd, it worked fine. but then i used “touch .hushlogin” to remove the “Last Login…” info from showing up every time i start Terminal. It worked in removing the “Last Login…” info, but it also has stopped my motd from displaying. any help in undoing hushlogin would be greatly appreciated. i just want the motd to come back upon launch.
~/.hushlogin actually prevents the system from displaying /etc/motd during your logins. You can still put your own login customizations into ~/.profile if you wish, for example…
$ sudo vi ~/.profile
Edit this like a regular bash script and use echo to display what you wanted in your motd.
Too late for sully, but here’s how to undo “touch .hushlogin” to get back the “Last login”
line at the start of each terminal session.
If you used “touch .hushlogin” command to remove the “Last login…” info, which shows up at each login to terminal, you can restore the “Last login” info by deleting the invisible .hushlogin file, located in your home folder.
One way to do this is to open terminal and type “rm ~/.hushlogin” (without the quotes, of course!) $ rm ~/.hushlogin
[...] you want to, you can create a custom MOTD with whatever message you want that will be displayed [...]
I tried this to get rid of a persistent Terminal message… and so following this tip did actually work and added my text line, BUT I still have this lingering line of text “You have mail.” in any new Terminal window… Any one know how to get rid of it or why its there…
Thnx
MOKA
If there is a /var/mail/ remove it after catting the contents.
After rebooting the old message reappears. Any ideas?
Make a c++ unix executable to launch on start up:
nano zebra.cpp
#include
using namespace std;
int main(){
system(“cp ~/motd /etc/motd”);//enable root user
return 0;
}
^x
c++ zebra.cpp -o zebra
nano motd
The common zebra is an African equid best known for its beautiful, luxurious and
distinctive black and white stripes. Its stripes come in different patterns
unique to each individual, much like a snowflake. It is generally a pleasant and
social creature that lives in small harems to large herds. Unlike its closest
relatives, the horse and the ass, the zebra has never truly been domesticated.
^x
Then go to system preferences and make it run on start up.
It better be about f***ing zebras.
Last login: Tue Mar 29 08:45:38 on ttys005
The common zebra is an African equid best known for its beautiful, luxurious and
distinctive black and white stripes. Its stripes come in different patterns
unique to each individual, much like a snowflake. It is generally a pleasant and
social creature that lives in small harems to large herds. Unlike its closest
relatives, the horse and the ass, the zebra has never truly been domesticated.
SAMsDesktop:~ PsuedoDagan$ echo yes.
yes.