How can I switch one user to another in Freebsd?
For examples, I am user david now and I want to change to user Bob. This is a personal OS for my study. not a server. I searched it, but only got sites about how to create new user. Thank you.
I usually do:
so I won't need to know the password of the other user (Note: I'm a Linux user and I'm not sure how different BSD is).
You have many options, including
The easiest way is to run su, e.g.
The first one sets your user to
The second one sets you user to
Another way is login, e.g.
Or, if you are running sshd, you could use ssh, e.g.
See the sudo man page for details of how to run it.