The fastest way: use the GUI settings panel

Linux Mint gives you a graphical way to change your username without touching the terminal. Open the System Settings process (look for the gear icon in your process menu), then select "Users and Groups" from the left sidebar. You will see your current user account listed. Click on it, then click the "Edit" button next to your username. Type your new username in the field that appears, click "OK", and the system will ask for your password to confirm the change.

This method works for most people and handles the behind-the-scenes file permissions automatically. The change takes effect the next time you log in. You do not need to restart your computer, but you will need to log out of your current session first.

One thing to know: changing your username does not change your home directory name. Your files will still live in /home/oldusername even after you log in as the new name. This is usually fine and causes no problems, but if you want the folder name to match your new username, you will need to use the terminal method instead.

Key Takeaways

  • The Settings app method is the simplest: open System Settings, find Users and Groups, click Edit next to your name, and type the new username.
  • Your home directory folder keeps its old name after a GUI change, which is harmless but means your path stays /home/oldusername.
  • The terminal method using usermod lets you rename both your username and your home directory folder at the same time.
  • You must be logged in as root or use sudo to change any username, including your own.
  • After any username change, log out completely and log back in before checking that everything works.

Renaming both username and home folder with the terminal

If you want your home directory folder to match your new username, you need to use the command line. Open a terminal and type the following command, replacing oldusername with your current username and newusername with what you want:

sudo usermod -l newusername -d /home/newusername -m oldusername

The system will ask for your password. The flags in this command do three things: -l changes the login name, -d sets the new home directory path, and -m tells the system to actually move your home folder to the new location. This single command handles everything at once.

After you run it, close the terminal and log out. When you log back in with your new username, your home folder will be at /home/newusername and all your files will be there.

What happens to your files and permissions

Your personal files — documents, photos, downloads, everything in your home directory — stay exactly where they are and remain yours. The system keeps track of ownership by a number called a user ID (UID), not by the username itself. When you change your username, your UID stays the same, so the system knows all those files still belong to you.

If you used the GUI method and your home folder is still named after your old username, that folder and everything in it is still yours. You can read, write, and delete files normally. The only inconvenience is that the path looks old.

If you used the terminal method with the -m flag, the entire folder gets moved and renamed, and ownership is preserved automatically. Either way, you will not lose access to anything.

Changing a username when you are not logged in as that user

If you need to change someone else's username (or if you are logged in as a different user), the process is the same but you must use sudo. Open a terminal and run:

sudo usermod -l newusername oldusername

This changes only the login name. If you also want to move the home directory, add the -d and -m flags as shown in the earlier section. The user whose name you are changing does not need to be logged in, and they will see the change the next time they log in.

Be careful with this command — if you make a typo, you could lock someone out of their account. Double-check the old username and new username before you press Enter.

Undoing a username change

If you change your username and then realize it was a mistake, you can change it back the same way. Use the GUI method or the terminal method to switch to whatever name you want. There is no special "undo" — you just run the change command again with the old name as the target.

If you moved your home directory and want to move it back, use the terminal method with the -m flag again. The system will move the folder back to the old path and update ownership. Make sure you are not logged in as that user when you do this.

Common problems and what to do

If you get a "permission denied" error when trying to change a username, you are probably not running the command with sudo. Add sudo to the beginning of the command and try again. You will need to enter your password.

If the GUI settings panel does not show an "Edit" button next to your username, you may not have administrator rights on this computer. Ask the person who set up the account to make the change, or use the terminal method with sudo if you know the root password.

If you change your username but cannot log in afterward, you may have a typo in the new name or a problem with the home directory path. Log in as a different user (or use recovery mode) and check the /etc/passwd file to see what name is actually stored. You can fix it by running the usermod command again with the correct spelling.

Frequently Asked Questions

Will changing my username break any of my programs?

Most programs will not care. They store settings in hidden folders inside your home directory, and those folders move with you. Some older programs that hardcode a username in their configuration might need you to update a config file by hand, but this is rare. Test your most important programs after the change to be sure.

Can I change my username without using the terminal?

Yes. Open System Settings, go to Users and Groups, click your account, click Edit, and type the new username. This is the easiest method for most people. The only downside is that your home folder keeps its old name, but that causes no real problems.

What if I forget my password and cannot log in to change my username?

You will need to boot into recovery mode or use a live USB to access the system as root. From there you can run the usermod command to change the username without needing to log in normally. This is a more advanced step — if you are stuck, ask someone with Linux experience to help.

Does changing my username affect my sudo permissions?

No. Your ability to use sudo is tied to your user ID and group membership, not your username. After you change your name, sudo will still work the same way it did before.

Can I change my username to something that already exists on the system?

No. Linux will not let you create a duplicate username. If you try, the usermod command will fail with an error saying the name is already in use. Pick a different name and try again.