linux set home directory for existing user code example Example: assign home directory to user linux usermod -d /path/to/dir username