Bits of Tech

Icon

Tips & Tricks from IT Pros


Editing the Terminal Banner (Message of the Day)

I like to have one of my favorite quotes displayed each time I open a new Terminal window. It’s pretty easy to do this, and I’m going to show you how.

First, you’ll need to open your Terminal app, which is located in the Utilities folder. To get there quickly, hit Command-Shift-U while in Finder. This will open the Utilities folder. Now open up Terminal.

Next, you need to open the /etc/motd file in vim. Type the following command at the prompt and hit return:

sudo vim /etc/motd

You’ll be prompted for your password, and after you enter it you’ll be presented with the motd document. If there’s anything in there, tap the Esc key, then double tap the D key to remove the existing text line by line. If there are multiple lines, keep double tapping D until the document is cleared.

Now, hit Esc then the A key. This will enter insert mode. Insert a blank line by hitting return, then enter the text you wish to be displayed. Make sure to leave a blank line at the end as well. When you’ve finished, hit Esc then hold Shift and double tap Z. This will save and exit.

Hit Command-Q to quit terminal, then reopen it and you’ll see your banner text at the top of the window above the prompt, as shown below:

terminal-motd.png

Technorati Tags: Mac, Terminal

Related Posts

Category: Mac OS

Tagged: Mac, Terminal

Bookmark and Share

Leave a Reply