Linux Rename Username CentOS

You can change / rename the username using the below command.

usermod -l login-name old-name

The name of the user will be changed from old-name to login_name. Nothing else is changed. In particular, the user’s home directory name should probably be changed to reflect the new login name.

Share

Leave a Reply

Your email address will not be published. Required fields are marked *