Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

/root

Direct answer

/root is the home directory of the root user, separate from /home so root can log in even when /home is not mounted.

When to use this

Use it when working as root and looking for root's files, SSH keys or shell settings.

First 30 seconds

1. ls -ld /root and findmnt /root — present and mounted where expected?

2. df -h /root — space left? df -i /root — inodes left?

3. Find large or unexpected content: du -xh --max-depth=1 /root | sort -h | tail.

4. Permissions and owner as the FHS and services expect?

5. Fix space, permissions or mount, then retest the service.

Operational verification

/root mounted (or virtual) → correct owner and permissions → enough space → services read and write as intended

Evidence · next step

For Filesystem → /root, continue with the first unproven Topic check: Verify root account home path and effective session identity. If that boundary is healthy, advance to the adjacent check: Check /root object type, ownership and permissions without weakening them as a shortcut. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Scope / prerequisiteUse it when working as root and looking for root's files, SSH keys or shell settings.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

5 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational evidence path Verify boundary

root account record → session/login mode → /root directory ownership/mode → shell startup/config → command environment → administrative workload result

Healthy evidence: root account data, /root ownership/mode and the exact privileged session startup/environment agree and the intended administrative task succeeds.

Step 2 Verification and output interpretation Verify boundary

Existing fast checks for this Topic. - Verify root account home path and effective session identity.

  • Check /root object type, ownership and permissions without weakening them as a shortcut.
  • Identify which shell startup files are actually loaded by the specific root session mode.
  • Test the administrative operation in the same interactive/non-interactive context that originally failed.

Verification chain. root account record → session/login mode → /root directory ownership/mode → shell startup/config → command environment → administrative workload result

Step 3 Commands Verify boundary
ls -la /root
stat -c %a /root
Step 4 Failure modes and next checks Narrow the fault

Suspicious evidence: /root and / are conflated, permissions are broadened to fix an unrelated issue, or interactive root profile behavior is assumed for sudo/service automation.

/root shows the root account home namespace, not root filesystem identity, kernel privilege mode or environment behavior of every privileged process.

Step 5 Common mistakes Narrow the fault
  • Storing shared scripts in /root.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points

Only root can read it (mode 700). Root's SSH keys are in /root/.ssh/authorized_keys. Keep large files out of it, because it is on the root filesystem.

Key checks
  • ls -ld <path> — owner, permissions and type
  • stat <path> — inode, links, size and timestamps
  • df -h <path> — filesystem and free space
  • findmnt <path> — which mount the path is on
ReferenceWhat it is1 section · depth on demand

Core model

Resolve root’s configured home path from account data, verify /root ownership/mode and current mount namespace, then treat shell startup/configuration files there as user-space root-session state. Keep root identity, root home and root filesystem as three separate concepts.

ReferenceImportant terms & boundaries5 sections · depth on demand

What this shows and what it does not

/root shows the root account home namespace, not root filesystem identity, kernel privilege mode or environment behavior of every privileged process.

In depth

/root: the superuser's home directory

The hier(7) manual page describes /root as usually the home directory of the root user. It's kept on the root file system and outside /home, so root can log in and repair the system even when /home is a network share or a separate file system that fails to mount.

/root compared with /home

/root/home/<user>
OwnerrootThe user
Typical mode700700 or 750
File systemRoot file systemOften separate or network-mounted
Available in rescue modeYesNot necessarily

What's typically found there

PathContent
/root/.bashrc, /root/.profileroot's shell configuration
/root/.ssh/authorized_keysKeys allowed to log in as root (should usually be empty)
/root/.bash_historyCommands run in root shells
Installer leftoversanaconda-ks.cfg, original-ks.cfg (RHEL family)

Security checks

CheckWhy
Mode 700Other users must not read root's files
/root/.ssh/authorized_keysUnexpected keys are a classic persistence mechanism
Scripts and secrets left thereMove them to managed locations
Installer kickstart filesMay contain password hashes

sudo and HOME

sudo -i and su - give root's environment, with HOME set to /root. Plain sudo command normally keeps the calling user's HOME on Debian and Ubuntu, but sets it to /root on RHEL, depending on env_keep and always_set_home. Programs that write to ~ can therefore end up putting root-owned files in your own home directory.

host$ sudo ls -la /root | head -6
drwx------  6 root root 4096 Nov 27 16:40 .
drwxr-xr-x 20 root root 4096 Apr 22  2026 ..
-rw-------  1 root root 9123 Nov 28 10:12 .bash_history
-rw-r--r--  1 root root 3106 Apr 22  2026 .bashrc
drwx------  2 root root 4096 Mar  3  2026 .ssh
host$ sudo stat -c '%a %n' /root
700 /root
host$ sudo wc -l /root/.ssh/authorized_keys 2>/dev/null || echo "no root keys"
no root keys
host$ sudo bash -c 'echo $HOME'
host$ find ~ -user root 2>/dev/null | head

Reading the last command

The final find lists root-owned files inside your own home directory. They're usually left behind by sudo commands that wrote to ~. They can make tools such as editors or package managers fail later with "permission denied".

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

How it works at runtime

/root is part of Filesystem → /root. /root is the conventional home directory for the root account, deliberately separate from /home so administrative access can remain available even when user-home storage is unavailable; it is not the filesystem root directory /.

Topic-specific state model. /root is the conventional home directory for the root account, deliberately separate from /home so administrative access can remain available even when user-home storage is unavailable; it is not the filesystem root directory /.

Interpretation rule. - /root ≠ /, and root account ≠ kernel mode.

  • Root account home is conventionally /root but should still be verified from account data.
  • Access as root ≠ ordinary users should receive equivalent access to /root.
  • Files in /root shell profiles ≠ non-interactive sudo/systemd/automation sessions load them.

Quick reference

/root is the home directory of the root user, kept on the root filesystem so it is available in single-user/rescue mode even when /home is not mounted.

Permissions should be 700 (or 550). Avoid working as root interactively; use named accounts with sudo so actions are attributable. Check /root/.ssh/authorized_keys during audits — forgotten keys there give permanent root access.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Limits and how it fails

Primary failure point. /root shows the root account home namespace, not root filesystem identity, kernel privilege mode or environment behavior of every privileged process.

ReferenceConfiguration & state1 section · depth on demand

Configuration, persistence and lifecycle

Distribution/platform context. /root owns root-home placement semantics. Users & Groups, Permissions, Shell/Bash, sudo and systemd branches own identity, authorization and session behavior.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

Authoritative/upstream documentation reviewed for bounded claims in Filesystem → /root. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html · confidence 94%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
linux /rootroot user home linuxroot home directorydifference slash root
Embedded reference data

Quick lookup tables

/root operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for /root.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective state/root is the conventional home directory for the root account, deliberately separate from /home so administrative access can remain available even when user-home storage is unavailable; it is not the filesystem root directory /.Establish exactly what this Topic owns before crossing into another subsystem.
Fast verificationPin process/container mount namespace → resolve the exact path from / and record every mount crossing → identify final dentry + filesystem/device + inode + file type → capture ownership/mode/ACL and capacity where relevant → map pseudo/device/runtime objects to the live kernel/process endpoint → verify the original consumer read/write/execute/service result.Use the shortest evidence path first; a fast check is a boundary test, not blanket proof.
Verification chainroot account record → session/login mode → /root directory ownership/mode → shell startup/config → command environment → administrative workload resultTrace requested/configured state through effective state to the observed workload result.
Failure boundary/root proves the root account home namespace, not root filesystem identity, kernel privilege mode or environment behavior of every privileged process.Stop broad troubleshooting at the first boundary that is not supported by evidence.
Positive evidenceCorrelated namespace, path and object evidence can establish this Linux Filesystem proof path: root account record → session/login mode → /root directory ownership/mode → shell startup/config → command environment → administrative workload resultUse this observation only for the specific claim it actually supports.
Evidence limitIt does not independently prove behavior outside the captured namespace, mount, inode/object, authorization, backing-resource or consumer scope. /root proves the root account home namespace, not root filesystem identity, kernel privilege mode or environment behavior of every privileged process.Do not promote a local success signal into end-to-end or adjacent-dependency proof.
Next troubleshooting checkContinue from the first unproven boundary: preserve the same process mount namespace, resolve the path and mount crossings, identify the exact object/inode or live pseudo/device endpoint, inspect effective access/capacity, then repeat the original consumer operation before changing unrelated filesystem state.Continue to the next unresolved boundary while preserving the original test condition.

/root · operational reference

Compact Linux state, persistence, verification and boundary reference for fast lookup.

Reference boundary/root
Topic pathFilesystem → /root
Runtime state/root is the conventional home directory for the root account, deliberately separate from /home so administrative access can remain available even when user-home storage is unavailable; it is not the filesystem root directory /.
Fast checks- Verify root account home path and effective session identity. - Check /root object type, ownership and permissions without weakening them as a shortcut. - Identify which shell startup files are actually loaded by the specific root session mode. - Test the administrative operation in the same interactive/non-interactive context that originally failed.
Verification chainroot account record → session/login mode → /root directory ownership/mode → shell startup/config → command environment → administrative workload result Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary.
Failure boundary/root proves the root account home namespace, not root filesystem identity, kernel privilege mode or environment behavior of every privileged process. Boundary chain: process credentials/namespace → path/mount lookup → DAC/ACL/LSM → filesystem metadata → block/device/backend → completion/read-back.
Persistence ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?