how do display current user in tcsh prompt?

Hello. I've been using %n to display current user in the tcsh prompt and I just noticed that the value doesn't change; e.g. I connect to the FreeBSD box via ssh using a normal user (let's call her jane). I then change user to root via su. And the username displayed in the prompt is still "jane". How can I make it display "root"?

Thanks :)
 
Modify root's .cshrc and set the prompt there too. Then use su - to not only login as root but also load root's environment.
 
The %n is being used in root's .cshrc. BUT I don't use the minus when changing user to root.

And it is working now! :D

Thanks @SirDice.
 
Last edited by a moderator:
Back
Top