Linux Mall - The Linux SuperStore!
Linux books, Linux CDs, Linux toys, you name it, they have it!

W W W . L I N U X D O T . O R G

Newbie's Linux Manual
Putting Life Into Your Terminal
by Laurence Hunter
[ Home ] [ Contents ] [ Download*] [ Previous ] [ Next ]
* In Linux enter: unzip nlm.zip
Red = Danger: Customising Your Prompt

I love this one. Makes your terminal look very cool. It will display the account your logged into in blue, followed by full path of your current directory (no more need for pwd). But here's the nifty bit, whenever you're root, root is displayed in red to constantly warn you!

- 1 -

Enter:

su -c 'pico /etc/bashrc'

...followed by the root password.

- 2 -

Add the following to the end of the file:


if [ $USER = 'root' ] ; then COLOUR=41 # red else COLOUR=44 # blue fi STYLE='m' # Default grey text. # STYLE=';1m' # Bright white text. export PS1="\[\033[$COLOUR;37$STYLE\]$USER:\[\033[37;40$STYLE\]\w\\$ "

- 3 -

Press Ctrl+D to log-out and log-in as a user.

A Cool Message Every Time You Log-in!
- 1 -

Enter:

su -c 'pico /etc/profile'

...followed by the root password.

- 2 -

Add the following to the end of the file:


# Call Fortune program, if available. if [ -x /usr/games/fortune ] ; then echo ; /usr/games/fortune ; echo fi

...and press Ctrl+O to save and Ctrl+X to exit.

Now every time you log-in you'll be greeted by a cool message.

[ Home ] [ Contents ] [ Download*] [ Previous ] [ Next ]
* In Linux enter: unzip nlm.zip
Homepage | The Last 5 Days | The Daily Linux News | The Linux Bits | Newbie's Linux Manual
The Best Linux Sites | Linux Book Reviews | A Windows Vendetta?
Diary of a Linux Newbie | Diary of an Open Source Newbie
The Linux Forum | Just For Fun
Amazon - The World's Biggest Bookstore!
4.7 million books, CDs, videos, and DVDs available to buy!
© MM Linuxdot.org | Webmaster | Manual's Copyright Terms