ln

Makes a link to a file

ln [options] existing-file new-link

ln [options] existing-file-list directory

The first format creates a link between an existing file and a new filename. The second format links existing files into a different directory. The new links have the same simple filenames as the original files but have different full pathnames.

By default ln makes hard links. A hard link to a file is indistinguishable from the original filename. All hard links to a file must be in the same filesystem as the original file.

You can also use ln to create symbolic links. Unlike a hard link, a symbolic link can exist in a different filesystem from the linked-to file. Also, a symbolic link can connect to a directory. Refer to page 126 for more ...

Get A Practical Guide to Red Hat® Linux® 8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.