Symbolic link – Does Windows have the ln -s or equivalent?

I need to link a file to C:WindowsSystem32driversetchosts

How can I do that with Windows ? Is there a soft link such as ln -s or equivalent in Windows ?

Solution:

You are looking for the command “mklink”.

Documentation and examples in Microsoft Docs or ss64.com.

Example taken from the link:

// To create a symbolic link named MyDocs from the root directory to the UsersUser1Documents directory, type:mklink /d MyDocs UsersUser1Documents