I want to create a bash file (.sh file) that creates a symlink using the dos mklink command.
mklink /D "path" "path"
Use this window command in bash
But when I tried that I got an error: mklink: command not found
How to solve that?
I want to create a bash file (.sh file) that creates a symlink using the dos mklink command.
mklink /D "path" "path"
Use this window command in bash
But when I tried that I got an error: mklink: command not found
How to solve that?
For use
mklinkin youWindows, read the information on ss64.com about.Elevation
By default, only Administrators can create symbolic links. The security setting 'Create symbolic links' can be granted at:
Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\*Creating a symbolic link requires elevation, but from Windows 10 build 14972, symlinks can be created without needing to elevate the console as administrator - this does however require that you have Developer Mode enabled.
So, you can enable Developer Mode enabled
I prefer to apply a boot after any changes made to the system settings, this is my habit, so I restarted and typed:
Obs.: You can also activate Developer Mode for Windows 10 using PowerShell, also for cmd command line or batch file:
Some further reading:
[√] MkLink /ss64.com
[√] MkLink /MS Doc's
[√] Enable Your Device For Development /MS Doc's