How to Create Symbolic Link (Symlink) in Linux

Tim Lysenko
2 min readAug 13, 2024

--

Symbolic links, also known as symlinks, allow you to create a name pointing to another file, directory, or object within the Linux file system. Utilizing symlinks reduces the need to duplicate files within a system. Centralizing changes in one location is more efficient than modifying multiple copies.

Symlinks also offer a means of controlling access. Users can own multiple directories that reference a subset of files. This restricts visibility in a more intricate way than what the file system permissions system allows.

Overall, in Linux and other UNIX-like operating systems, a symbolic link (symlink) is used to reference a file or directory. Symlinks have numerous applications, ranging from organizing the operating system’s tree structure to enhancing the accessibility of files on the filesystem.

Discover the step-by-step process of creating symbolic links in Linux with the ln command.

What distinguishes Linux’s soft connections from its hard ones?

On your system, a soft link or symbolic link will direct users to the original file. A hard link will make a duplicate of the document.

In contrast to hard links, soft links may refer to other files or directories on a separate file system.

Understanding the Difference Between Soft Links and Hard Links

It can be quite confusing to differentiate between a symlink and a hard link. A disk’s file system contains control blocks known as inodes. These provide information about files and other objects, such as the location of their associated data on the disk. In a Linux directory, names like “config” are associated with inode numbers. Creating a hard link establishes an alias, allowing for an associated name that shares the same inode number. Refer to the man page for the ln utility for more information, especially regarding any restrictions when it comes to creating and deleting hard links.

The symlink, also known as a soft link, functions as a referrer instead of an alias. Imagine it as a guide directing you to the desired file’s location. The Linux system uses the symlink’s file path to access the target.

Continue reading here — https://vsys.host/how-to/how-to-create-symbolic-link-symlink-in-linux

--

--