# info > readlink

---
type: CommandReference
command: readlink
mode: info
section: 
source: info
---

## Quick Reference

- `readlink FILE` — Print value of a symbolic link.
- `readlink -f FILE` — Canonicalize, resolving all symlinks, ignoring missing components except last.
- `readlink -e FILE` — Canonicalize, requiring all components exist.
- `readlink -m FILE` — Canonicalize, treating missing components as directories.
- `readlink -n FILE` — Print without trailing newline (single file).
- `readlink -z FILE` — Output with NUL delimiter.
- `readlink -s FILE` — Suppress error messages (default).
- `readlink -v FILE` — Report error messages.

## Name

`readlink` — Print value of a symlink or canonical file name

## Synopsis

shell
readlink [OPTION]... FILE...
## Options

- `-f, --canonicalize` — Activate canonicalize mode. If any component of the file name except the last one is missing or unavailable, `readlink` produces no output and exits with a nonzero exit code. A trailing slash is ignored.
- `-e, --canonicalize-existing` — Activate canonicalize mode. If any component is missing or unavailable, `readlink` produces no output and exits with a nonzero exit code. A trailing slash requires that the name resolve to a directory.
- `-m, --canonicalize-missing` — Activate canonicalize mode. If any component is missing or unavailable, `readlink` treats it as a directory.
- `-n, --no-newline` — Do not print the output delimiter, when a single FILE is specified. Print a warning if specified along with multiple FILEs.
- `-s, -q, --silent, --quiet` — Suppress most error messages (on by default).
- `-v, --verbose` — Report error messages.
- `-z, --zero` — Output a zero byte (ASCII NUL) at the end of each line, rather than a newline. Allows other programs to parse output even with embedded newlines.

## See Also

- `realpath` — preferred command for canonicalization (see `coreutils` info, `realpath invocation`)

## Exit Codes

- `0` — success
- nonzero — failure