/etc/motd Formatting

It is good practice to announce server maintenance dates and scheduled downtime dates many days prior to the actual downtime. The easiest way to ensure that all users become aware of the scheduled downtime is to place an alert in /etc/motd.

For those of you that don’t know, /etc/motd is the file that gets printed to the screen when a user first logs into the system.

However, in the case of our server (possibly most servers), users tend to ignore the contents of motd since it very rarely changes. In order to attract the attention of any user that logs into the system, I have begun adding formatting (bold, underline, colors, etc) to the motd file on our server.

Formatting can be easily added to any motd using ANSI codes. For example, below is a copy of a sample maintenance announcement for our server:

Notice that the text “Server Maintenance” is what first got your attention. This is because of the different color, bold text, and blinking text (blinking text is not supported in IE, Chrome, and Safari).

Below is a list of some of the formatting commands i use, as well as the corresponding displayed text. Note that the ^[ that appears often in purple in the below images is the escape character. To insert this character, within VIM press and hold ctrl + ‘v’ and then press escape.






Enhanced by Zemanta

3 thoughts on “/etc/motd Formatting

  1. chauffe eau

    Undeniably consider that which you said. Your favourite justification seemed to be at

    the net the simplest thing to take into account of.

    I say to you, I certainly get annoyed while other people consider concerns that they

    just don’t know about. You controlled to hit the nail upon the highest and also defined out the entire thing without having side-effects , folks could take a signal. Will likely be back to get more. Thank you

  2. Ahaa, its nice conversation regarding this piece of writing here at this blog, I have read all that,

    so at this time me also commenting at this place.
    gîTe Gard recently posted..gîTe GardMy Profile

  3. KoZm0kNoT

    Ah the joys of Google Translate…

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

This site uses Akismet to reduce spam. Learn how your comment data is processed.