Can I log in with other user's account?

I would like to ask you about login command in bash shell Ubuntu.

I entered #login then it asks me about username and password. Is this a way to log in with other user's account?


Solution 1:

login does exactly what the name says, it logs a user in and sets up the environment, but the login command is not intended for switching to another user account on the command line. For this you would either use su username to switch to another account, or sudo -u username to run just a single command as another user.