How to rename a user in Linux
Simply issue this command:
usermod -m -d /home/new-account-name -l new-account-name old-account-name
It creates the home directory if it does not exists. It also copy the stuff of the old user into the new user account.
Copyright 2012–2026, Claude "Tryphon" Théroux
Leave a Comment