---
title: "Your Absolute Guide to Hard link Vs Soft link in Linux"
description: "Here are examples to create hard links and symbolic links in Linux and the differences between these two."
url: https://srinimf.com/2022/10/17/what-is-hard-and-symbolic-link-in-linux-and-how-to-use/
date: 2022-10-17
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2022/10/pexels-photo-6231875.jpeg?fit=1880%2C1253&ssl=1
categories: ["Linux"]
tags: ["Hard link Vs Soft link", "Soft link vs Hard link"]
type: post
lang: en
---

# Your Absolute Guide to Hard link Vs Soft link in Linux

Here are the differences between hard link and soft link in Linux. Below, you will find examples of [how to](https://srinimf.com/2018/03/17/centos-python-pandas/) create them.

*Hard link Vs Soft link*

![linux hard link vs soft link](https://i0.wp.com/srinimf.com/wp-content/uploads/2022/10/pexels-photo-114675.jpeg?resize=1880%2C1058&ssl=1)*Photo by Mike Bird on Pexels.com*

Table of contents

1. [Soft (Symbolic) link](https://srinimf.com/2022/10/17/what-is-hard-and-symbolic-link-in-linux-and-how-to-use/#soft-symbolic-link)
2. [Hard link](https://srinimf.com/2022/10/17/what-is-hard-and-symbolic-link-in-linux-and-how-to-use/#hard-link)

## **Soft (Symbolic) link**

```
lrwxrwxrwx 1 root root   11 2018-08-11 07:34 libc.so.6 -> libc-2.6.so
```

The beginning first letter ‘l’ says it is a link (symbolic). The soft link’s purpose is to use the same file in multiple places. That reduces your coding time.

For instance, a program needs a file named foo, but foo has frequent version changes. If we do not make it shared, it is hard to track down which version of the file is being used. In this scenario soft link I’d helpful.

**Code to create soft link**

```
ln -s source_file symbolic_link
```

Related[3 Top Python Communities](https://srinimf.com/2019/05/01/3-top-python-forums-to-get-quick-resolutions/)

**Example of Soft link**

- Here is an example of a soft link

Related[PLI Online Class Subscribe Today](https://srinimf.com/2020/04/13/subscribe-to-pli-online-class/)

*Here’s a way to create hard and soft links in Linux*

## **Hard link**

While we are on the subject of links, we need to mention that there is a second type of link called hard links. Hard links also allow files to have multiple names, but they do it differently.

Related[3 Free Python Downloads – Here’re Links](https://srinimf.com/2015/06/01/python-the-most-powerful-language/)

Precisely, a [hard link](https://www.redhat.com/sysadmin/linking-linux-explained) acts using a file with a different name. And the resource (source) is not sharable. It is the opposite in the case of symbolic link – That means the resource is sharable. to create the Hard link

Related[CICS Tricks and Tips](https://srinimf.com/2012/12/30/cics-tricks-and-tips/)

**Code to create hard link**

Related[Cobol-Syntax Guide](https://srinimf.com/2013/01/28/cobol-syntax-guide/)

```
ln orginal_file_path new_file_path
```

Related[20 Software Engineer Gift Ideas: From Gadgets to Games](https://srinimf.com/2023/03/25/20-software-engineer-gift-ideas-from-gadgets-to-games/)

**Example of hard link**

- [Here is an example of a hard link](https://www.tiger-computing.co.uk/linux-tips-hard-soft-links/)

Related

Related[IT-Software Engineers MUST Read website!](https://srinimf.com/2011/11/19/it-software-engineers-must-read-website/)

- [Cobol-Syntax Guide](https://srinimf.com/2013/01/28/cobol-syntax-guide/)DateJanuary 28, 2013
- [Linux: The Hierarchy of System Directories](https://srinimf.com/2018/08/30/linux-directories-for-new-programmers-really-useful/)DateAugust 30, 2018
- [PLI Online Class Subscribe Today](https://srinimf.com/2020/04/13/subscribe-to-pli-online-class/)DateApril 13, 2020

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2022%2F10%2F17%2Fwhat-is-hard-and-symbolic-link-in-linux-and-how-to-use%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2022%2F10%2Fpexels-photo-6231875.jpeg%3Ffit%3D1200%252C800%26ssl%3D1&description=Your%20Absolute%20Guide%20to%20Hard%20link%20Vs%20Soft%20link%20in%20Linux)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2022/10/17/what-is-hard-and-symbolic-link-in-linux-and-how-to-use/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2022/10/17/what-is-hard-and-symbolic-link-in-linux-and-how-to-use/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2022/10/17/what-is-hard-and-symbolic-link-in-linux-and-how-to-use/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2022/10/17/what-is-hard-and-symbolic-link-in-linux-and-how-to-use/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20Your%20Absolute%20Guide%20to%20Hard%20link%20Vs%20Soft%20link%20in%20Linux&body=https%3A%2F%2Fsrinimf.com%2F2022%2F10%2F17%2Fwhat-is-hard-and-symbolic-link-in-linux-and-how-to-use%2F&share=email)
-

### Like this:

Like Loading…
