Adding more information to the Bash login prompt

Q How do I customise a login prompt? I want the penguin, CPU info, memory info, bogomips rating and an actual prompt. Can you help?

A The text displayed on the console immediately before the login prompt is taken from the file /etc/issue. Put the text you want displayed, including any ANSI graphics, into this file. You can even use a Cron task to modify this file with time reminders, such as Mother's Day next Sunday' or 'Buy new Linux Format tomorrow'. If your artistic abilities fall short of creating ANSI penguins, you probably need the Linux_logo package, available from www.deater.net/ weave/vmwprod/linux_logo and possibly in your distro's package repository. The Linux_logo man page lists various options to control the output. The example that you found looks as though it was created with

linux_logo -c -y -k >/etc/issue

Good luck! The surrounding graphic is a framebuffer splash screen, by the way, which is completely separate from the prompt.

Follow us on Identi.ca or Twitter

Username:   Password:
Create Account | About TuxRadar