ls -l shows where a symlink points, but only one step at a time. When links point to links, I want the final answer.
readlink -f canonicalizes by following every symlink in every component of the name, recursively, and prints the absolute path:
readlink -f /usr/bin/python3
readlink -f ./current
It is handy to see which binary an alternatives link really leads to, or where a current release folder points today. A typical release layout has current pointing at a dated folder:
ln -sfn /mnt/user/appdata/<app>/releases/2026-11-28 /mnt/user/appdata/<app>/current
readlink -f /mnt/user/appdata/<app>/current
The second command prints the dated folder. Plain readlink without options would print only the direct target of that one link, which is the right choice when you want just one step.
There are two relatives. -e requires that every component exists, and -m has no requirement on whether components exist. With -f, all but the last component must exist, otherwise you get no output and a failing exit code.
The man page itself says realpath is a better command for canonicalization. In a new script I would reach for that, and keep readlink -f for habit at the prompt, where it is shorter to remember.
Further reading: readlink(1) manual page