From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 1 Deploy, Configure, and Manage (2021)

Unlock the full course today

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

Create hard and soft links

Create hard and soft links

- [Instructor] When organizing our workspace, it can be advantageous to create links or shortcuts to our files and directories. For instance, we can have a link in our home directory to called Netdrive, that points to a network drive that's at /media/network/server/bob/files, this saves time browsing to it as it's a shortcut in our home directory. There are two different kinds of links, symbolic links and hard links. We'll start out by creating hard links. In a terminal, let's create a directory for this exercise. Type in mkdir lnexercise, and hit Enter, then cd lnexercise and hit Enter again, you can verify your path by typing in pwd. Now let's create a file in a directory. Type in touch file.txt and hit Enter, and then create a directory by typing mkdir dir1, we can verify this with ls -l, we can see that we have a file named file.txt and a directory named dir1. Now let's create a hard link to file.txt and we'll…

Contents