How to rename username in linux


As an example, let's rename the user rajesh to ideapad.

kill only process(es) running as USER rajesh

Specify new value of the login name to ideapad

Change the user_name to NEW_GROUP

Specify the new home for the user_account

Change the new value of the GECOS field

Print real and effective user and group IDs

Now, You can login with new username using same old password. You will find all file's and folder's of old user's home directory in new user's home.

You may also like...

%d bloggers like this: