Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

shell prompt

Status
Not open for further replies.

tech84

Technical User
May 18, 2000
126
US
Here's an easy one... how do I set up the shell prompt to contain the username and hostname, please.

Thanks! Mike
[morning]
 
Mike:

Provided you're using a modern shell like ksh, use the PS1 variable. This is in my .profile:

export PS1='$LOGNAME@$SYSNAME:$PWD'":> "

Regards,

Ed
 
I'm using bash, so it should work okay.

Thanks for your help! Mike
[morning]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top