Symbolic Links

Let's talk about another type of link between files, the symbolic link.

There is one other type of link that is really useful, and it is called a symbolic link or sometimes a soft link. Hard links are somewhat limited as you can’t create one to a directory, for fear that you will create a cycle in the directory tree. You can’t hard link to files in other disk partitions, etc., because inode numbers are only unique within a particular file system, not across file systems. Thus, a new type of link called the symbolic link was created“A Fast File System for UNIX” by Marshall K. McKusick, William N. Joy, Sam J. Leffler, Robert S. Fabry. ACM TOCS, 2:3, August 1984. We’ll talk about the Fast File System (FFS) explicitly later on. Here, we refer to it because of all the other random fun things it introduced, like long file names and symbolic links. Sometimes, when you are building a system to improve one thing, you improve a lot of other things along the way..

Creating a symbolic link

To create such a link, you can use the same program ln, but with the -s flag. Here is an example:

Get hands-on with 1200+ tech skills courses.