NTFS symbolic link
Encyclopedia
An NTFS symbolic link is a filesystem object in the NTFS filesystem
that points to another filesystem object. The object being pointed to is called the target. Symbolic link
s should be transparent to users; the links appear as normal files or directories, and can be acted upon by the user or application in exactly the same manner. Symbolic links are designed to aid in migration and application compatibility with POSIX
operating systems, and were introduced with the modifications made to the NTFS file system with Windows Vista
.
Unlike an NTFS junction point
(available since Windows 2000), a symbolic link can also point to a file or remote SMB
network path. While NTFS junction points support only absolute paths on local drives, the NTFS symbolic links allow linking using relative paths. 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.
An NTFS symbolic link is not the same as a Windows shortcut file, which is a regular file. The latter may be created on any filesystem (such as the earlier FAT32), may contain metadata (such as an icon to display when the shortcut is viewed in Windows Explorer
), and is not transparent to applications.
with Run as administrator option or the
It has the following command line syntax:
Just like ordinary files and folders,
To delete a symbolic link to a file or directory, the following command line syntax can be used (in each case, "linkname" specifies the name of the symbolic link to be deleted):
NTFS
NTFS is the standard file system of Windows NT, including its later versions Windows 2000, Windows XP, Windows Server 2003, Windows Server 2008, Windows Vista, and Windows 7....
that points to another filesystem object. The object being pointed to is called the target. Symbolic link
Symbolic link
In computing, a symbolic link is a special type of file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution. Symbolic links were already present by 1978 in mini-computer operating systems from DEC and Data...
s should be transparent to users; the links appear as normal files or directories, and can be acted upon by the user or application in exactly the same manner. Symbolic links are designed to aid in migration and application compatibility with POSIX
POSIX
POSIX , an acronym for "Portable Operating System Interface", is a family of standards specified by the IEEE for maintaining compatibility between operating systems...
operating systems, and were introduced with the modifications made to the NTFS file system with Windows Vista
Windows Vista
Windows Vista is an operating system released in several variations developed by Microsoft for use on personal computers, including home and business desktops, laptops, tablet PCs, and media center PCs...
.
Unlike an NTFS junction point
NTFS junction point
An NTFS junction point is a feature of the NTFS file system that provides the ability to create a symbolic link to a directory which then functions as an alias of that directory...
(available since Windows 2000), a symbolic link can also point to a file or remote SMB
Server Message Block
In computer networking, Server Message Block , also known as Common Internet File System operates as an application-layer network protocol mainly used to provide shared access to files, printers, serial ports, and miscellaneous communications between nodes on a network. It also provides an...
network path. While NTFS junction points support only absolute paths on local drives, the NTFS symbolic links allow linking using relative paths. 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.
An NTFS symbolic link is not the same as a Windows shortcut file, which is a regular file. The latter may be created on any filesystem (such as the earlier FAT32), may contain metadata (such as an icon to display when the shortcut is viewed in Windows Explorer
Windows Explorer
This article is about the Windows file system browser. For the similarly named web browser, see Internet ExplorerWindows Explorer is a file manager application that is included with releases of the Microsoft Windows operating system from Windows 95 onwards. It provides a graphical user interface...
), and is not transparent to applications.
Restrictions
The default security settings in Windows Vista/Windows 7 disallow non-elevated administrators and all non-administrators from creating symbolic links. This behavior can be changed in the Local Security Policy management console (under: Security Settings\Local Policies\User Rights Assignment\Create symbolic links). It can be worked around by starting cmd.exeCmd.exe
Command Prompt is the Microsoft-supplied command-line interpreter on OS/2, Windows CE and on Windows NT-based operating systems...
with Run as administrator option or the
runasRunasIn computing, runas is a command in the Microsoft Windows line of operating systems that allows a user to run specific tools and programs under a different username to the one that was used to logon to a computer interactively...
command.Syntax
Themklink
command is used to create a symbolic link. It is natively available in Windows Vista/2008+.It has the following command line syntax:
/D
– Creates a directory symbolic link. Default is a file symbolic link./H
– Creates a hard linkHard linkIn computing, a hard link is a directory entry that associates a name with a file on a file system. . The term is used in file systems which allow multiple hard links to be created for the same file. This has the effect of creating multiple names for the same file, causing an aliasing effect: e.g...
instead of a symbolic linkSymbolic linkIn computing, a symbolic link is a special type of file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution. Symbolic links were already present by 1978 in mini-computer operating systems from DEC and Data...
./J
– Creates a Directory JunctionNTFS junction pointAn NTFS junction point is a feature of the NTFS file system that provides the ability to create a symbolic link to a directory which then functions as an alias of that directory...
.link
– Specifies the new symbolic link name.target
– Specifies the path (relative or absolute) that the new link refers to.
Just like ordinary files and folders,
delDel (command)In computing, del is a command in various DOS, OS/2 and Microsoft Windows command line interpreters such as COMMAND.COM, cmd.exe, 4DOS/4NT and Windows PowerShell. It is used to delete one or more files or directories from a filesystem. It is analogous to the Unix rm command...
and rmdirRmdirrmdir is a command which will remove an empty directory on a Unix, DOS, OS/2 or Microsoft Windows operating system. In Unix, Linux, and MacOS, it is case sensitive, whereas DOS, OS/2 and Windows , you can type the characters in any combination of upper case and lower case letters, and rd/rmdir...
can be used to delete symbolic links to files and directories.To delete a symbolic link to a file or directory, the following command line syntax can be used (in each case, "linkname" specifies the name of the symbolic link to be deleted):
- For links to files:
- For links to directories:
Other features
Symbolic links can point to non existent targets because the operating system does not check to see if the target exists.External links
- Documentation for NTFS symbolic links on MSDN
- CreateSymbolicLink function in the Win32 API
- Link Shell Extension, which presents a graphical interface for creating hardHard linkIn computing, a hard link is a directory entry that associates a name with a file on a file system. . The term is used in file systems which allow multiple hard links to be created for the same file. This has the effect of creating multiple names for the same file, causing an aliasing effect: e.g...
and symbolic links as well as directory junctions - Symlink accessible driver for 2000/XP/2003,