Sunday, September 27, 2009

How to change your shell prompt

satoshiabe@ubuntu-0904-server-i386-1:~$ uname -a
Linux ubuntu-0904-server-i386-1 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:48:10 UTC 2009 i686 GNU/Linux
satoshiabe@ubuntu-0904-server-i386-1:~$ echo $PS1
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$
satoshiabe@ubuntu-0904-server-i386-1:~$ export PS1=%\
% echo 'Hello, world!'
Hello, world!
%

No comments: