This question already has an answer here:

when I installed Ubuntu 14.04 I missed some thing on my user name , how to correct it and display it correctly in the terminal.

thanks for help .

marked as duplicate by Pilot6, Oli Jul 5 '15 at 21:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Do following from root or user with sudo rights:

sudo usermod -l new_username current_username

sudo mv /home/current_username /home/new_username

sudo usermod -d /home/new_username new_username

And optional, but not sufficient (I think usermod should change only login name, but not your UID)

sudo chown -R new_username /home/new_username

I believe it will be enough for changing user name. Please note, never do that from current user name!!! Log in as root or another user with sudo rights.

See good article on Arch Linux wiki (applicable to all common Linux distros)


  • ask me if you have any problems – user3417815 Jul 5 '15 at 20:22
  • After a fresh install this is not needed. My solution will work fine. – Pilot6 Jul 5 '15 at 20:27

You can not edit user name.

You can create another user with correct name with administrative privileges. Then login with new user account and remove the incorrect user.

It can be done from System Settings -> User Accounts application.

  • 1
    That's not true. User login, home, group can be simply changed if user have access to root or user account with root rights. – user3417815 Jul 5 '15 at 20:20
  • @user3417815 I know. But it is not straight forward to change user name and home directory, etc for a newbie. – Pilot6 Jul 5 '15 at 20:21
  • maybe, but we can post simple set of command for this and let know user what is possible to do in any way (gui and cli) – user3417815 Jul 5 '15 at 20:23
  • 1
    @user3417815 I marked it as duplicate. There is a ready answer. – Pilot6 Jul 5 '15 at 20:23
  • yeah, so common question. of course user should search before ask something. – user3417815 Jul 5 '15 at 20:25

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