Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to a create symbolic link in Windows

📅 2012-Oct-22 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ mklink, shortcut, symbolic link, windows ⬩ 📚 Archive

A shortcut in Windows is just a .lnk file that is created and used by Windows Explorer. In contrast to that, a symbolic link is an alias for a file or a directory that is created in the filesystem.

In Windows, symbolic links are only supported on NTFS, not on FAT or FAT32 filesystems. Symbolic links can be created at the command-line using the mklink command of the command prompt.

To create a symbolic link to the file Hello.txt named Foo.txt:

mklink Foo.txt Hello.txt

To create a symbolic link to the directory Hello named Foo:

mklink /d Foo Hello

Creating symbolic links requires Administrator privilege by default. So, open a command prompt with elevated privileges to try these commands.

Tried with: Windows 8 Pro