What is the difference between NTFS Junction Points and Symbolic Links? What is the difference between NTFS Junction Points and Symbolic Links? windows windows

What is the difference between NTFS Junction Points and Symbolic Links?


Symbolic links have more functionality, while junctions almost seem to be a legacy feature because of their limitations, but the security implications of these limitations are specifically why a junction might be preferred over a symbolic link. Remote targeting makes symbolic links more functional, but also raises their security profile, while junctions are safer because they are constrained to local paths. So, if you want a local link and can live with an absolute path, you're probably better off with a junction; otherwise, consider a symbolic link for its added abilities.

enter image description here

*The statement of difference in speed/complexity comes from an unverified statement in the Wikipedia entry on NTFS reparse points (a good read).

**Ever since the Windows 10 Creators Update, one can enable Developer Mode to remove the admin restriction for NTFS symbolic links.


Other NTFS Link Comparisons

Here are some other comparisons on the topic, but these can be misleading when considering junctions because they don't list the benefits I list above.

Taken from here (a good introductory read)

enter image description here

From SS64 page on MKLink

enter image description here


Comments about Terminology

Junctions are Reparse Points (may be described as symbolic links)

NTFS Junctions and NTFS Symbolic links are really doing the same thing in the same way (reparse points), aside from the aforementioned differences in how they're processed. In fact, technically, a Junction is a "symbolic link" in the more general sense of the word, and sometimes documentation might call a Junction a symbolic link, as is the case here. In such cases, "symbolic link" does not mean NTFS Symbolic Link which is different than a junction (see below).

NTFS

Even though the OP specifies this, it's worth pointing out that "symbolic link" is a very general term that is not specific to NTFS. So, to be specific, this comparison is about NTFS Junctions vs. NTFS Symbolic Links.


The places I find the most useful for the differences:

http://blogs.msdn.com/b/junfeng/archive/2006/04/15/576568.aspx

http://www.hanselman.com/blog/MoreOnVistaReparsePoints.aspx

Postulate: Symlink is to Junction in Windows as Symlink is to Hardlink in Unix.

http://en.wikipedia.org/wiki/Symbolic_link#Windows_7_.26_Vista_symbolic_link

Windows 7 and Windows Vista support symbolic links for both files and directories with the command line utility mklink. Unlike junction points, a symbolic link can also point to a file or remote Server Message Block (SMB) network path. Additionally, the NTFS symbolic link implementation provides full support for cross-filesystem links. However, the functionality enabling cross-host symbolic links requires that the remote system also support them, which effectively limits their support to Windows Vista and later Windows operating systems.

http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-symbolic-links/

A symbolic link, as created by Windows, is much similar to a directory junction, but unlike a directory junction it can point to a file or a remote network file or directory. The target may be defined as a path relative to the symbolic link position, or an absolute path in the current volume or another one. Also note that symbolic links to files are different from symbolic links to directories and the target must match the definition.


Functionally, in windows, once created, there is no real difference. However, there are significant differences between them in what they can do. Junctions can be used only for the creation of links to folders, either on the same drive or different drives, but only if those drives are on the local system (you can not create a junction link to a folder over a network.) Symbolic links however, do not have the same restrictions. Symbolic links can be used to link to either files or folders and those files or folders can be located either on the same system (same drive or different drives) or to a network share and can make use of relative location symbolics ("\\system2\foldera\file.txt", "d:\foldera\file.txt", "\\system2\foldera", "d:\foldera" or "d:\foldera\folderb.." with the resulting link for the last 2 examples being the same location.) Relative location symbolics can be ".", "..", current drive relative function (if current drive is c:, then specifying "\tempa\folderb" results in a link to c:\tempa\folderb,) and current directory relative (if the current directory is d:\foldera\folderb, then specifying "d:file.txt" results in a link to d:\foldera\folderb\file.txt.)

To sum it up: Junctions Points are limited to folders on the local system only, while Symbolic Links can create links to folders or files accessible via a UNC path or on the local system with more versatility in how those locations are designated. Symbolic Links is basically a more versatile replacement for both Junction Points and Hard Links. Plus, Symbolic Links are compatible with Unix and Linux when creating a cross platform UNC pathed link.

Hopefully, this answers your question in a satisfactory manner.Edited to correct typographical errors.