REALPATH(1) User Commands REALPATH(1)

# [NAME](#NAME)

realpath - print the resolved path

# [SYNOPSIS](#SYNOPSIS)

**realpath** \[*OPTION*]... *FILE*...

# [DESCRIPTION](#DESCRIPTION)

Print the resolved absolute file name.

[**-E, --canonicalize**](#E,)

all but the last component must exist (default)

[**-e, --canonicalize-existing**](#e,)

all components of the path must exist

[**-m, --canonicalize-missing**](#m,)

no path components need exist or be a directory

[**-L, --logical**](#L,)

resolve '..' components before symlinks

[**-P, --physical**](#P,)

resolve symlinks as encountered (default)

[**-q, --quiet**](#q,)

suppress most error messages

[**--relative-to=DIR**](#relative)

print the resolved path relative to DIR

[**--relative-base=DIR**](#relative~2)

print absolute paths unless paths below DIR

[**-s, --strip, --no-symlinks**](#s,)

don't expand symlinks

[**-z, --zero**](#z,)

end each output line with NUL, not newline

[**--help**](#help)

display this help and exit

[**--version**](#version)

output version information and exit

# [AUTHOR](#AUTHOR)

Written by Padraig Brady.

# [REPORTING BUGS](#REPORTING_BUGS)

Report bugs to: &lt;bug-coreutils@gnu.org&gt;.  
Report any translation bugs to: &lt;https://translationproject.org/team/&gt;.  
GNU coreutils home page: &lt;https://www.gnu.org/software/coreutils/&gt;  
General help using GNU software: &lt;https://www.gnu.org/gethelp/&gt;

# [COPYRIGHT](#COPYRIGHT)

Copyright © 2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later &lt;https://gnu.org/licenses/gpl.html&gt;.  
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

# [SEE ALSO](#SEE_ALSO)

[**readlink**(1)](/man/os/coreutils/readlink.1), [**readlink**(2)](/man/os/coreutils/readlink.2), [**realpath**(3)](/man/os/coreutils/realpath.3)

Full documentation &lt;https://www.gnu.org/software/coreutils/realpath&gt;  
or available locally via: info '(coreutils) realpath invocation'

October 2026 GNU coreutils 9.12

---

Document: realpath(1) from coreutils 9.12-r5 (Chainguard OS)
Source: https://git.savannah.gnu.org/git/coreutils.git
