Sunday, 17 July 2011

Changing command line prompt in UNIX


When you connect to UNIX command line you get some default prompt. For example it can display your current directory. But what if you want to change it. Simple – just set PS1 variable.

Display current directory+ “>” sign:

export PS1=$PWD>

Display  hostname + “>” sign

export PS1=`hostname`\>


No comments:

Post a Comment