Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

      Version: 2.0.0.08

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
add comment

2 Answers

up vote 15 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
add comment

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
add comment

Your Answer

 
discard

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.