Michael's Blog

Home | Gallery | Stats | Downloads | Links | Scripts | Fuel Stats | Wiki | RSS
Marge: Homer, the plant called. They said if you don't show up tomorrow don't bother showing up on Monday.
Homer: Woo-hoo. Four-day weekend. 
-- Homer Simpson     Add quote.

Sensible Bash Prompt

2009-02-23 19:21:40.643867 by Michael 0 Comments
Tags: linux bash unix

If you're a bash user like me and login to A LOT of servers every day, it helps to have a visible notation of what server you're actually on. Add this to your .bashrc file and source it.

# set prompt
PS1="[\u@`hostname`] \W > "

There's a lot more you can do like adding a clock, the history number, etc. but I prefer to keep it simple.