Softlink / Symbolic link in Windows NTFS

Softlinks are useful in any operating system to shorten long, complicated path names like C:/user/foo/data to just C:/data. You may need to add user permission to create symbolic links.

From Windows Command Prompt:

mklink LINK TARGET

For directories add the /d option

mklink /d LINK TARGET

Example: default GNU Make filename in MinGW is mingw32-make.exe, but we’d rather type make:

cd C:\mingw\mingw64\bin

mklink make.exe mingw32-make.exe

Powershell symbolic link creation syntax is more verbose:

New-Item -ItemType SymbolicLink -Path "Link" -Target "Target"

For the same example as above:

cd C:\mingw\mingw64\bin

New-Item -ItemType SymbolicLink -Path "make.exe " -Target "mingw32-make.exe"

On Linux / Mac / BSD, softlinks are created like:

ln -s /media/myusbdrive/data ~/data

Notice that the order of target arguments are reversed between Windows and Linux.