HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

mklink — Create symbolic links. More information: <https://learn.microsoft.com/windows-server/administration/

Submitted by: @import:tldr-pages··
0
Viewed 0 times
createcommandsymboliccliinformationlinksmklinkmore
windows

Problem

How to use the mklink command: Create symbolic links. More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/mklink>.

Solution

mklink — Create symbolic links. More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/mklink>.

Create a symbolic link to a file:
mklink {{path\to\link_file}} {{path\to\source_file}}


Create a symbolic link to a directory:
mklink /d {{path\to\link_file}} {{path\to\source_directory}}


Create a hard link to a file:
mklink /h {{path\to\link_file}} {{path\to\source_file}}


Create a directory junction:
mklink /j {{path\to\link_file}} {{path\to\source_file}}

Code Snippets

Create a symbolic link to a file

mklink {{path\to\link_file}} {{path\to\source_file}}

Create a symbolic link to a directory

mklink /d {{path\to\link_file}} {{path\to\source_directory}}

Create a hard link to a file

mklink /h {{path\to\link_file}} {{path\to\source_file}}

Create a directory junction

mklink /j {{path\to\link_file}} {{path\to\source_file}}

Context

tldr-pages: windows/mklink

Revisions (0)

No revisions yet.