How to a create symbolic link in Windows

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

Advertisements

One thought on “How to a create symbolic link in Windows

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.