Forrest logo
tool overview
On this page you find all important commands for the CLI tool mklink. If the command you are looking for is missing please ask our AI.

mklink

The "mklink" command line tool is a Windows command used to create symbolic links and hard links. It is available in Windows Vista and later operating systems. The purpose of this tool is to create a connection between different files or directories within the file system.

When creating a symbolic link, the "mklink" command allows you to link a file or directory to another file or directory, providing a shortcut or reference to the target location. This can be useful when organizing files and folders, as it allows you to access them from multiple locations.

In contrast, a hard link created with "mklink" is a direct pointer to the target file or directory. Any changes made to the target will be reflected in the linked file or directory as well. Hard links can only be created for files on the same volume.

The "mklink" command supports various switch options, such as specifying whether the link is a directory or a file, setting the relative path of the target, or even creating a symbolic link that can be used by non-administrative users.

Overall, "mklink" is a powerful command line tool that provides flexibility and efficiency when managing file and directory links in the Windows operating system.

List of commands for mklink:

  • mklink:tldr:27972 mklink: Create a symbolic link to a directory.
    $ mklink /d ${path\to\link_file} ${path\to\source_directory}
    try on your machine
    explain this command
  • mklink:tldr:68443 mklink: Create a directory junction.
    $ mklink /j ${path\to\link_file} ${path\to\source_file}
    try on your machine
    explain this command
  • mklink:tldr:ac1e6 mklink: Create a symbolic link to a file.
    $ mklink ${path\to\link_file} ${path\to\source_file}
    try on your machine
    explain this command
  • mklink:tldr:d7eac mklink: Create a hard link to a file.
    $ mklink /h ${path\to\link_file} ${path\to\source_file}
    try on your machine
    explain this command
tool overview