I am currently:
root@sensu-server-client:/#
I wish to change to:
sensu@sensu-server-client:/#
How does one do this. I tried: su sensu
but nothing happens.
I am currently:
root@sensu-server-client:/#
I wish to change to:
sensu@sensu-server-client:/#
How does one do this. I tried: su sensu
but nothing happens.
You should use
su
:If you specify the login option (either
-
, or-l
, or--login
: all are synonyms), you will get an environment similar to if you directly logged in as that user. Otherwise you stay in the current environment (e.g. manyenv
variables, the current directory, etc).Example: (note the usernames and current working directories!)
PS: If you run
su
not as root, you will of course be prompted for the password of the user as who you want to log in.