Terminal 101-1

Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
Welcome to Terminal 101

Back in the day (not that long ago), when Terminal was started, a file was read which put a message on the screen.
I don't know when Apple did away with it but Mountain Lion doesn't have it. IT is a file in /etc called motd.
Motd stands for Message Of The Day. Admins used this to send messages to users mainly on text only screens in Unix/Linux etc.
It was used to state rules for remote login users or notices of maintenance or shutdowns for all users.
As luck would have I put one in /etc in ML and it still works! So fire up Terminal and follow along.

This will work whether you have a motd file or not. Type: sudo nano /etc/motd
Or you can
cd /etc
sudo nano motd
If the file is there, nano will open it. If not, nano will create it. Use your login password.
You should see a window like the one below. Type in whatever message you want your Terminal users to see when they log in.
Now type control-o to save the file. Control-x to quit nano. You're done! It's that easy. Quit Terminal and restart it.
Your message will show before the prompt. See second pic.

Stay tuned for more Terminal how-to's as I can do them.

craig_—_nano_and_Untitled.jpg

craig_—_bash.jpg
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Craig:

You need to get together with Van and inquire as to whether he would like to see you write something up in blog format rather than put it here in "Apps......" where it will soon be buried and forgotten.

I personally like the idea of teaching terminal to our users who are interested.
 
OP
cradom
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
Sounds like an idea. Was unsure whether it would be well received at all so thought I would put out a feeler.
 
M

MacInWin

Guest
Worked like a champ, Craig. One tiny point for any terminal rookies, before you do the "sudo nano motd" command "cd /etc" to get into the /etc directory. Otherwise terminal opens in your home directory, so motd will be created there. If that happens you can "mv motd /etc/motd" to get it to the /etc directory.
 
OP
cradom
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
Guess I had my head up my ...
Thanks, fixed it! :)
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Sounds like an idea. Was unsure whether it would be well received at all so thought I would put out a feeler.
Shoot me a PM and we can sort things out. Would love to have a series of Terminal howtos on the blog. I'll be out of town this weekend so we might have to start the process on Monday.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top