Change Linux’s username

To change you own user name in linux if you have only one account, proceed as follows:

1. create another temporary user, e.g. tempo:

sudo adduser tempo

2. Give him permissions for sudo:

sudo adduser tempo sudo

3. Logoff from you username. Go to TTY5 and login as tempo

4. Suppose your username is john and you want to change to michael.
In there type in as sudo:

groupadd michael

usermod -d /home/michael -m -g michael -l michael john

6. login again now as michael, and that’s done.
Logoff from tempo in TTY5 and delete tempo account:

sudo userdel tempo


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s