Linux for Noobs

Full Version: Rename linux user and their home directory
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
First, list you users:
Code:
less /etc/passwd

Then, rename the user:
Code:
sudo usermod -l newuser olduser

Finally change the home directory and copy the content of the old home:
Code:
sudo usermod -d /home/newuser -m newuser