Linux Filesystem Cheat Sheet/Resolve canonical absolute path

Normalize paths and follow symlinks.

Section: Links

Resolve canonical absolute path

bash
bash
realpath ./app-current/../config

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Links
Create symbolic link
Create a symlink to another file or directory.
OpenIn sheetbashsame section
Show symlink target
Print where a symlink points.
OpenIn sheetbashsame section
Create hard link
Create another filename pointing to the same inode.
OpenIn sheetbashsame section
Print working directory
Show the absolute path of the current directory.
OpenIn sheetbash1 tag match
Long listing with human sizes
Show detailed directory contents with human-readable sizes.
Create nested directories
Create a directory path including missing parents.