Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

symbolic link
shortcut
cmd
windows
command prompt

mklink Windows 10

Educative Answers Team

What is mklink?

mklink is a keyword used to make symbolic-links between directories. Imagine that you wanted to store a directory somewhere and wanted a shortcut to access it from somewhere else. mklink would enable you to achieve this task.

Format

mklink <Option> <Link> <Target>

Link is the path where you want the shortcut/symbolic-link to be, PLUS the name of the shortcut.

Target is the path to the folder you want to link to.

Option provides three parameters to specify the type of link you want to establish.

Symbol Use
/d or /D Creates a soft symbolic link
/h or /H Creates a hard symbolic link
/j or /J Creates a Directory Junction

Example

1. Open Command Prompt

widget

Click on the Windows symbol on the screen or press the Windows button on your keyboard to open the start-up menu. Search cmd or Command Prompt. Right-click on it and run it as administrator.

2. Write mklink

widget

Write mklink and specify the option.

If no option is specified, then the mklink creates a soft link that points to the target by default.

Then, provide the path where you want to create the shortcut and add filename at the end of it. For example, in the above image, the path is:

C:\Users\HP\Desktop

and the filename is:

\link_to_important

Finally, add the target path where you want the link to direct you.

3. Completion

widget

The above statement will appear if the symbolic link is created successfully.

RELATED TAGS

symbolic link
shortcut
cmd
windows
command prompt
Copyright ©2022 Educative, Inc. All rights reserved
RELATED COURSES

View all Courses

Keep Exploring