# Create Symbolic Links

> ln - make links between files

`ln` command is used to create a symbolic link. By default `ln` creates a hard link, but we can use `-s` option to create a symbolic link.

## Usage

### Adding Symbolic Links

```bash
ln -s {ORIGINAL_FILE} {LINKED_FILE}
```

This will create a symbolic link.

```bash
ln -sf {ORIGINAL_FILE} {LINKED_FILE}
```

**Note:** `-f` option overwrites the exisiting symbolic link.

### Adding Symbolic Links Between Directories

```bash
ln -s {ORIGINAL_DIRECTORY} {DIRECTORY_TO_BE_LINKED}
```

This creates a symbolic link link between two directories.

### Deleting Symbolic Links

To remove a symbolic link, we can either remove the linked file by using `rm` or use `unlink` to do the same thing.

```bash
rm {LINKED_FILE}
unlink {LINKED_FILE}
```

***Source:*** [***phoenixNAP***](https://phoenixnap.com/kb/symbolic-link-linux)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://til.devjugal.com/linux/create-symbolic-links.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
