# how do display current user in tcsh prompt?



## mrjayviper (May 20, 2014)

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


----------



## SirDice (May 20, 2014)

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.


----------



## mrjayviper (May 20, 2014)

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! 

Thanks @SirDice.


----------

