How to customize PS1 prompt in BASH?  

Monday, October 18, 2010

Edit your .bashrc

export PS1="[\u@\w]\n>"

output:
[ubuntu@~/temp]
>



Relevant info: http://www.understudy.net/custom.html#Korn

AddThis Social Bookmark Button
Email this post


How to customize PS1 prompt in KSH?  

eg:

>[/current/dir] >
>
>I'd like it to be:
>[/current/dir]

edit your .profile

export PS1=[`hostname`:'$PWD]^V^J
>'
where ^V is control-V and ^J is control-J to accomplish this.

AddThis Social Bookmark Button
Email this post


Design by Amanda @ Blogger Buster