From the course: LPI Linux Essentials (010-160) Cert Prep

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Creating links

Creating links - Linux Tutorial

From the course: LPI Linux Essentials (010-160) Cert Prep

Start my 1-month free trial

Creating links

- In Linux, sometimes it's handy to refer to a single file using multiple names rather than to create several copies of it so users can create multiple links to a single file. These are known as hard links or symbolic links. And both of these are created using the ln command or the link command. Let's first take a look at the hard link. The hard link is a duplicate directory entry. And both the entries are going to point to the same file. Because they both work together by tying together this low-level file system data structures, hard links can only exist on a single file system. In a hard-link scenario, neither file name is going to hold any sort of priority over the other. Both of them are going to tie directly to the file's data structures. So to create a link, you're just going to type in ln space the original name space the link name you want to create. This way you're going to be able to create this hard link. Now…

Contents