How to Create a Symbolic Link With mklink on Windows 11
🔍 WiseChecker

How to Create a Symbolic Link With mklink on Windows 11

Quick fix: Open Command Prompt as Admin (or enable Developer Mode for non-admin). Run: mklink "C:\Link\Path" "D:\Actual\Target" for file link. Add /D flag for directory link: mklink /D "C:\Folder" "D:\Target". Add /J for junction (directories, same volume only, no admin needed): mklink /J "C:\Junction" "D:\Target".

mklink creates symbolic links and junctions on NTFS. Useful for: redirecting paths without moving data, alias deep paths, share files between locations. Requires Admin for symbolic links (or Developer Mode); junction doesn’t require Admin.

Symptom: Want to create a symbolic link with mklink on Windows 11.
Affects: Windows 11 (and Windows 10).
Fix time: ~5 minutes.

ADVERTISEMENT

What causes this need

Symbolic links useful for:

  • Redirecting app data to another drive (e.g., Steam library).
  • Sharing config files between projects.
  • Creating aliases for deep paths.
  • Working around path length limits.
  • Developer / build tool workflows.

Method 1: Create symbolic link to file

The standard route for files.

  1. Open Command Prompt as Admin (or enable Developer Mode for non-admin: Settings → Privacy & security → For developers → Developer Mode on).
  2. Basic file symlink:
    mklink "C:\Link.txt" "D:\Actual\File.txt"

    First path: alias to create. Second: actual file.

  3. Apps reading C:\Link.txt actually read from D:\Actual\File.txt.
  4. Changes via the symlink edit the real file.
  5. Delete symlink: del "C:\Link.txt". Doesn’t delete target.
  6. For PowerShell equivalent:
    New-Item -ItemType SymbolicLink -Path "C:\Link.txt" -Target "D:\Actual\File.txt"
  7. For verifying: dir /AL C:\ shows links.

This is the file symlink.

ADVERTISEMENT

Method 2: Create symbolic link to directory

For directories, including cross-volume.

  1. Same cmd as Admin.
  2. Directory symbolic link (cross-volume capable):
    mklink /D "C:\AliasFolder" "D:\TargetFolder"

    /D: directory symbolic link.

  3. Works cross-volume (C: to D: or even network share).
  4. Apps access C:\AliasFolder as if it were the target.
  5. For Steam library on D: but accessible as C:\Games\Steam:
    mklink /D "C:\Games\Steam" "D:\SteamLibrary"
  6. Delete: rmdir "C:\AliasFolder". Or right-click → Delete in File Explorer.
  7. Caveat: some installers don’t handle symlinks correctly. Test app behavior first.

This is the directory symlink.

Method 3: Create junction (alternative)

For non-admin or simpler use case.

  1. Junctions are similar to directory symlinks but: same volume only, no admin required.
  2. Create junction:
    mklink /J "C:\Junction" "C:\Target"

    /J: junction (directories only).

  3. Apps see junction as folder. No admin needed.
  4. Cross-volume doesn’t work (must be C: to C: or D: to D:).
  5. For deep app folder redirect: junction is enough if all on same drive.
  6. For seamless integration: junctions are widely supported by apps (Steam, etc.).
  7. To verify: dir /AL shows JUNCTION type.
  8. To delete: rmdir "C:\Junction". Doesn’t delete target.

This is the junction.

How to verify the fix worked

  • Symlink path returns target content when accessed.
  • dir /AL [path] shows SYMLINK or JUNCTION.
  • Right-click symlink → Properties → Target field shows actual path.
  • Files in symlinked folder editable; changes appear at target.

If none of these work

If mklink fails: Permission denied: run cmd as Admin. Or enable Developer Mode for symbolic links. Junctions don’t need Admin. FAT32 / exFAT: don’t support reparse points. Use NTFS. For chronic issues: target path must exist when creating link. Verify target. For specific apps: some apps refuse to use symlinks (security policy). Try junction. For Insider builds: symlink behavior consistent. For corporate-managed PCs: Group Policy may restrict. For path with spaces: quote paths. For network share targets: must use symbolic link, not junction. May need fsutil behavior set SymlinkEvaluation R2L:1 R2R:1 to enable remote-to-remote.

Bottom line: mklink "C:\Link" "D:\Target" for file. mklink /D "C:\Folder" "D:\Folder" for directory (cross-volume). mklink /J "C:\Junction" "C:\Target" for junction (same volume, no admin).

ADVERTISEMENT