What is a hard and a symbolic link

Jean Pierre Ballen
1 min readFeb 5, 2021

Let’s take a look at what is a hard link.

A hard link points or reference to a specific space on the hard drive that means that if you change the data in one of the hard link or the file the other will reflect that change , also if you delete the hard link that will not delete the original file.

If you want to create a hard link you should just type in your terminal:

ln source_file link

Replace “source_file” with the name of the file for which you want to create the hard link and “link” with the name of the hard link.

Now let’s look at what is a symbolic link. A soft link (symbolic link) is like a shortcut in windows, we can say that it’s an indirect pointer to a file or directory, it also can point in a different filesystem or partition.

If you want to create a symbolic link you only need to type

ln -s source_file link

The -s option indicates that is a symbolic link. The “source_file” is the name of the file and the “link” is the name of the symbolic link.

That’s all. have a good coding.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response