Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-26-2013, 01:26 PM   #1
LQ Newbie
Registered: Sep 2012
Posts: 6

Rep: Reputation: Disabled
Is it possible to add comments in /etc/motd file in centos / redhat

Hi All,

I have a requirement to add comments in /etc/motd file and these comments should not reflect in ssh login banner.. Is it possible to add comments in /etc/motd file ?
Because when ever I comment any line with # it just prints the line along with # as
# comment..... when we login using ssh.

Please add your comments, thanks in advance.

Old 11-26-2013, 03:02 PM   #2
Senior Member
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
You cannot add comments to the motd file. Anything you put in there is displayed on screen. I guess I should also ask why you are attempting to put comments in the motd it sounds like you found that to be a solution to a problem you have but that may not be the proper tool.
Old 11-26-2013, 03:16 PM   #3
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 & 7
Posts: 3,194

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
# All lines in /etc/motd are sent verbatim


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how to add comments into a text file using sed agarrett5 Linux - Newbie 7 05-27-2012 06:59 PM
[SOLVED] Add lines end of file above the end comments bkone Programming 2 02-27-2012 09:58 AM
Updating the /etc/motd file on many servers MOTDManager Linux - Server 2 09-14-2010 12:03 AM
CentOS: add SAN directory to local file system RobertSubnet Linux - Newbie 4 06-12-2009 12:32 PM
coloring the contents of motd file shamanth Linux - Software 1 06-03-2006 05:46 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:59 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration