To rename an account (user ID) on an Ubuntu Linux system, you can use the usermod
command.
For example, to rename the account olduser
to newuser
, you can use the following command:
sudo usermod -l newuser olduser
This will change the login name of the olduser
account to newuser
.
Keep in mind that renaming an account will not automatically update the names of the directories and files owned by the account. You will need to update these manually if desired.
For more information on renaming an account on Ubuntu Linux, you can refer to the Ubuntu documentation or the man pages for the usermod
command.