What is the difference between a hard link and a symbolic link?

  • The file or folder permissions.
  • The owner of the file and folder.
  • The path of the file or folder in our hard drive.
  • The date when we create it.
Checking the inode Number.
Creating the hard link.
  • ln → command in charge of making links between files.
  • enlaceduro.txt →It is the path or name of the original file that we have on our hard drive.
  • enlaceenalceduro →Corresponds to the path or name of the hard link that we are going to create.
Checking inodo number of the original file.
Checking the inodo numbre of the hard link.
Creating a file and checkint inodo number.
Checking inodo numbre of the symbolic link.
  • Symbolic links can be made with files and directories while hard links can only be done between files.
  • Symbolic links can be made between different file systems, hard ones cannot.
  • Hard links share the inode number, symbolic ones do not. In symbolic links if the original file or directory is deleted, the information is lost, in hard ones it is not.
  • Hard links are exact copies of the file while symbolic links are mere pointers or “shortcuts”. “ taken from https://www.raulprietofernandez.net/blog/gnu-linux/como-crear-enlaces-simbolicos-y-duros-en-gnu-linux
Image taken from https://rm-rf.es/diferencias-entre-soft-symbolic-y-hard-links/



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Valentina Gómez A.

Valentina Gómez A.

Hi I am a financial engineer, and a software development student in Holberton School!