Share this on (or read 3 comments/add one below):

3 comment

    1. Try the -m and -d /home/jerry option; the contents of the current home directory will be moved to the new home directory, which is created if it does not already exist:

      usermod -m -d /home/jerry -l jerry tom
      ### gone ###
      ls /home/tom 
      ### as it moved to ###
      ls /home/jerry
      

      You may have to take care of secondary group memberhsip too.

Leave a Comment