15 septiembre, 2024

What is a symbolic link? | Bootcamps

In the world of technological development, the term symbolic link or Symlink (symbolic link) refers to a file type that points to another file or filesystem, whether local or remote, and also to directories. It is used in systems such as Linux, as an entry in a file system. This link uses the permissions of the source system.

It is similar to the so-called Windows shortcutswith the difference that this access is not a real file, while in the case of the symbolic link, this is recognized by the system as the actual file or directory, so it provides a different or alternative way to access it. This type of link can point to a file that does not exist, generating a broken link.

One of its main advantages is that we can use symbolic links to help in finding certain filescreating an easier way to access these folders, especially when they are located in different directories on the file system.

symbolic link (soft link) vs hard link

Symbolic links are also called soft linkand their characteristic is that Any modifications or changes we make will be reflected in the original, but if we delete the link, only the link will disappear and not the authentic file. Likewise, if the source file or directory is deleted, the symlink it remains, but your data does not.

Another type of link is hard link or hard linkswhich They are an exact copy of the file, and they work by associating two or more files, sharing the same inode. This means that when changes are made to any of the links, this will also be done to the rest.

Another difference between these types of links is that the soft link can be used with files and directories, while hard links Their use is limited to files only. Additionally, if we delete the information from the original file or archive, the information will be removed from the symbolic link (), but will remain in the hard links.

How to create a symbolic link?

To create a symlink we will execute the command:

#symbolic link ln -s

Being:

ln: the link command,

so-symbolic: the specification that the file should be soft.

File/Folder Path: The file you want to link or create.

Path of the link to be created: the link to itself or shortcut.

What is the method to follow?

If you are interested in continuing to learn about how to create, delete and modify symbolic links (symlinks) and what their practical application is, as well as others tools that help you accelerate the life cycle of your software development processes, and improve and speed up the deliveries of your project, Do not hesitate to be part of our DevOps & Cloud Computing Full Stack Bootcamp and become an expert on these topics in less than 6 months.

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *