How to change a message at the login console on Linux

Last updated on August 4, 2020 by Dan Nanni

Question: I would like to show a custom message at the login console. How can I change a pre-login message which appears at the login screen?

The pre-login message you see at the console screen is useful in multi-user Linux environment for various purposes. It can contain important messages for users to be aware of when they are logging in. In Linux, the pre-login message to be shown at the console screen is specified in /etc/issue file.

/etc/issue is a plain text file which can optionally contain escape sequences for various built-in information.

The following is an example of /etc/issue file.

This is a test message.

Current date: d
Current time: t
System name: s
Architecture: m
OS build info: v
Hostname: n
Kernel: r
Number of logged-in users: u

Once you edit /etc/issue as above, you will see the following message at the login console.

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean