Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.