Under Linux, the
usermod command changes user names. It modifies the system account files to reflect the changes that are specified on the command line.
To change just the username:
<code>usermod -l new_username old_username </code>
To change the username and home directory name:
<code>usermod -l new_username -m -d /new/home/dir old_username </code>
You may also want to change the name of the group associated with the user:
<code>groupmod -n new_username old_username</code>