Customize the console prompt in VMWare ESXi 4.0

The default console prompt of VMWare ESXi 4.0 really sucks, it’s black&white, it gives no info about the host you are connected to and if you have more than one host this is becomes quickly an headache.
So, how do you change it? Pretty easy:


echo 'export PS1="\[33[01;32m\]\u@\h\[33[00m\]:\[33[01;34m\]\w\[33[00m\]\$ "' > $HOME/.profile

then exit from the shell (ssh or local) and enter again and you will have a pretty nice colored console prompt :)

EDIT: ok, it seems that I cannot post “backslash zero” with WordPress. so please put before any “33” in this string “backslash zero” (the symbol and the number, not the two words). Thanks to Daniel for pointing this out. If you know a way to solve this, please share it :)

Advertisements

5 thoughts on “Customize the console prompt in VMWare ESXi 4.0

  1. hey,

    if I paste your export my prompt gets terribly garbled. I think you might have missed some backslashes and the octal marking zero in front of those escape charcodes. It ought to be 33 instead of 33. You can even use \e, which is nicer to read/pick for humans. :)

  2. It must be something in your theme, because in my wordpress install I can enter \0 (both in <pre> tags or in normal text).
    If the previous one shows, it’s because I’ve used the HTML entity \.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s