usermod -l modifies the login name, -g modifies the primary group and -m -d moves the users home directory.
usermod -l
-g
-m -d
usermod -l newname pi usermod -g newgroup pi usermod -m -d /home/newname newname