Easy Ways to Create Symbolic Links (Symlinks) in Windows 11

bardimin pic

Written by Bardimin

On March 8, 2023
Home » Blogs » Windows » Easy Ways to Create Symbolic Links (Symlinks) in Windows 11

Symbolic links can save you a lot of time and make file management easier. Here's how to create Symbolic Links (Symlinks) easily in .

Symlinks, also known as symbolic links, are often used to point to system files and folders in . Symbolic links are like shortcuts you create in Windows. However, symbolic links are much more powerful and useful than regular shortcuts.

Symbolic links (Symlinks) are unique files on the file system that do not contain data but serve as shortcuts to files or folders. When symlink is accessed, the operating system treats it as a native file or and operates completely invisibly.

Symbolic Links (Symlinks) in Windows

Symbolic links are commonly used for system files and directories. You can use it when you need to move a large file to another disk and Windows needs to remember that the file is still in its original directory.

In Windows, three types of file links are available for NTFS volumes.

Hard Links

Hard Links can only point to local files, not folders. A hard link is a file connection to another file on the same disk that is not duplicated.

All hard links appear as original files or directories that point to the same location on your . So if you change the hard link, it reflected those changes in the original file.

If you create hard links for a specific file and want to delete that file, you must also delete each hard link. Because the hard link represents the actual file and points to a location on the hard disk.

Symbolic Links (soft links, symlinks)

Symbolic links (soft links, symlinks) can point to files, folders, or local resources on a remote computer (using the UNC path).

Soft links work the same way as regular shortcuts, while symlinks represent the address of the file and not the actual file. Unlike shortcuts, symlinks are not files, so they don't use disk space like in shortcuts.

Unlike a hard link, a symlink does not point to a location on the hard disk. They point to a file or directory that points to a location. So if you want to delete the file, you don't need to delete all the symbolic links that lead to it.

Junction Points (Directory Hard Link)

Directory Hard Link can only point to directories, either on the same disk or on different disks.

How to Create Symbolic Links (Symlinks) in Windows

To create symbolic links (symlinks) in Windows, you can use or PowerShell. Open a or PowerShell and run it as Administrator.

Type the following command in Command Prompt or PowerShell:

mklink /d [link-target] [network-share]

Where:

[link-target]  = the name of the symlink to be created.

[link-source]  = the location of the file or to be linked to the symlink.

Symbolic Links

Example: To create a “MyDocuments” symlink inside the “D:\Bardimin” folder that points to the “Documents” folder, type:

mklink /d D:\Bardimin\MyDocuments C:\User\Documents

Press Enter to run the command. A new symlink will be created in the specified location, inside the “D:\Bardimin” folder.

How to Create Symbolic Links (Symlinks) from a remote computer

You can create a symbolic link to a share folder on a remote computer or server. Specify the network share address in UNC format. To create a symlink from a remote computer, type the command:

mklink /d [link-target] [network-share]

Example: To create a symlink “RemoteDocuments” inside the “D:\Bardimin” folder that points to the “Share” folder of the remote computer with the name “-UHMTS9H” which has the IP address “192.168.0.2”, type:

mklink /d D:\Bardimin\RemoteDocuments \\DESKTOP-UHMTS9H\Share

or

mklink /d D:\Bardimin\RemoteDocuments \\192.168.0.2\Share

Advantages of Using Symbolic Links (Symlinks)

  • Symbolic links (symlinks) are faster than regular shortcuts, and on slow computers, we recommend you use symlinks.
  • Sometimes, you have to copy a large amount of data from one place to another. Using symlinks will be faster than doing copy and paste and can also save a lot of storage space.

Latest Articles

The sequence of Windows boot processes from zero to ready

The sequence of Windows boot processes from zero to ready

Have you ever wondered how exactly the Windows boot process happens? What processes happen in the background when you press the power button until Windows is ready for you? If yes, then you are in the right place. In this article, Bardimin will explain how all these...

Redirect and Block URLs with HOSTS File on Windows

Redirect and Block URLs with HOSTS File on Windows

Redirect and Block URLs you can easily on Windows. Just by adding the IP of a website, you can redirect or block it. Of course, this is very useful to limit the access of your employees or children from accessing websites that you do not allow. Your Windows PC has...

How Proxy Anonymity Works

How Proxy Anonymity Works

The exchange of information on the Internet is carried out on a client-server model. The client sends a request (what files he needs) and the server sends a reply (what files he needs). For close cooperation (full understanding) between the client and the server, the...

How to Create Fake Files of Any Size in Windows

How to Create Fake Files of Any Size in Windows

Do you need a file with a size of 10 MB, 100 MB, 1 GB or 1 TB to test? Follow the following article to create one instantly. You don't need to download files or waste time searching for large files, you can create them easily. Sometimes you need large files quickly to...

Calculation of Ideal Bandwidth Requirements

Calculation of Ideal Bandwidth Requirements

The majority of hosting companies have a choice of bandwidth options in their plans. So, what exactly is bandwidth in the context of web hosting? In simple terms, bandwidth is the amount of traffic allowed between your website and the rest of the internet. The amount...