O'Reilly logo

A Practical Guide to Red Hat® Linux® 8 by Mark G. Sobell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required