Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

/home: User home directories - Amazon Linux 2023

/home: User home directories

Normal users have their home directories under /home, but software should always look for the per-user $HOME environment variable rather than relying on a pattern such as /home/$USER.

By default, AL2023 images have /home on the root file system, but software should not rely on this. It is perfectly valid for the OS to be configured for /home> to be a separate file system, which is mounted later during boot, or only after a user authenticates to the system.

The root user home directory is not in /home but rather is /root so that it is available in the event that the /home file system cannot be mounted.

Note

It is best practice for systemd services which do not need write access to /home to be configured with the ProtectHome=read-only directive. With this option, /home, /root, and /run/user are made read-only for the service.

It is also best practice for services that do not need any access to /home to be configured with the ProtectHome=tmpfs directive, which will run the service in a sandbox where /home, /root, and /run/user are empty read-only tmpfs file systems.

For more information on using systemd to restrict what access a service has to the system, see the systemd.exec(5) man page.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.