Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm getting more familiar with tweaking the way things look in a shell via the prompt (.bashrc), but I'm now trying to change the initial stuff displayed when I first log in. On my EC2 instance, this is what I see when I log in:

         __|  __|_  )  Fedora 8
         _|  (     /    32-bit

  Welcome to: 

    Wowza Media Server 2 for Amazon EC2


On my home Mint computer, here's what I see when I log in:

Welcome to Linux Mint 11 Katya (GNU/Linux 2.6.38-8-generic x86_64)

Welcome to Linux Mint
* Documentation:  http://www.linuxmint.com

Last login: Tue Jun 21 17:44:05 2011

Where is this defined? How can I tweak it for some mad ASCII art ACTION?

share|improve this question
up vote 16 down vote accepted

The text displayed before the login prompt is stored in /etc/issue (there's a related file, /etc/motd, that's displayed after the user logs in, before their shell is started). It's just a normal text file, but it accepts a bunch of escape sequences:

  • \b -- Baudrate of the current line.
  • \d -- Current date.
  • \s -- System name, the name of the operating system.
  • \l -- Name of the current tty line.
  • \m -- Architecture identifier of the machine, eg. i486
  • \n -- Nodename of the machine, also known as the hostname.
  • \o -- Domainname of the machine.
  • \r -- Release number of the OS, eg. 1.1.9.
  • \t -- Current time.
  • \u -- Number of current users logged in.
  • \U -- The string "1 user" or " users" where is the number of current users logged in.
  • \v -- Version of the OS, eg. the build-date etc.

On my machine I have:

This is \n (\s \m \r) \t \l

Which is rendered as:

This is etudes-1 (Linux x86_64 2.6.39-gentoo) 17:43:10 tty1

share|improve this answer

The file /etc/issue and /etc/issue.net are the files displayed by the login program. You can put special expansion characters in it, as noted on the other answer. But you may also want to try the linux_logo program. It can generate really nice ASCII art issue files for you.

share|improve this answer

You can also configure the ssh daemon to display a message during login. Specify the file to display with the Banner directive in the sshd_config file:

Banner /etc/ssh/ssh_banner

The filename can be any file, but for sanity I keep it in /etc/ssh along with the sshd_config file.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.