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've misspelled user name when installing Ubuntu and would like to rename if possible. How can I safely change my user name?

share|improve this question
This answers may still be valid. – Takkat Oct 17 '11 at 20:11
@takkat thanks. There you've got a good formal answer on how to rename a user. But I believe Jo-Erlend's suggestion I've got here is safer :-) – Ivan Oct 17 '11 at 20:25
If you haven't done much with your user, I'd definitely go for Jo-Erlends approach. I had other people in mind that may come here for a more sophisticated solution on this topic. Renaming users is not a trivial task. – Takkat Oct 17 '11 at 20:41
up vote 3 down vote accepted

Safely? Don't rename at all. Instead, (make sure the user is logged out first) create a new user with the correct username, rename the old home directory to the new username and chown -R the folder to the new user.

This assumes that you're not using encrypted homes. That would require some different steps, but since I haven't done that myself, I'll leave that to someone else.

share|improve this answer

Use usermod like so:

usermod -l newname currentname
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.