How Do I Restore My Home Directory in Linux?
Contents

How do I restore the home directory in Linux?

Restore whole home directory from scratch

  1. Check user UID and GID: $ id user1 uid=54324(user1) gid=54325(user1) groups=54325(user1)
  2. Delete user home directory and the user via root privilege: # rm -rf /home/user1.
  3. Copy all the files from /etc/skel directoy in user’s home directory.

Where is the Home folder Linux?

The home directory is defined as part of the user’s account data (e.g. in the /etc/passwd file). On many systems—including most distributions of Linux and variants of BSD (e.g. OpenBSD)—the home directory for each user takes the form /home/username (where username is the name of the user account).

Chloe Bennett

Chloe Bennett

Culture, Media & Entertainment Columnist

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.

Share this article
Twitter Facebook Pinterest