arrow-left arrow-right brightness-2 chevron-left chevron-right facebook-box facebook loader magnify menu-down rss-box star twitter-box twitter white-balance-sunny window-close
Prettify your shell prompt
1 min read

Prettify your shell prompt

I’ve used the same shell prompt for ~10 years now. 10 years. The colors I use come from an old IRC friend’s bash configuration utility (I probably have the script source buried deep in some archives somewhere).

You’ll notice that the prompt tells you the current user’s username, the hostname of the machine, and the current folder.

shell

If you’d like something similar, simply place the following line in the .bashrc file of your home directory.

PS1=[33[1;30m][[33[1;36m]
u[33[0;36m]@[33[1;36m]
h[33[1;30m]][33[0;36m]:[33[1;36m]:[33[0;37m]
W[3[1;36m>[33[0m] 

Realize that it should all be a single line (I broke it here so that it would fit nicely and be a bit easier to read).

You've successfully subscribed to P O L Y M A T H.
Success! Your account is fully activated, you now have access to all content.