Press "Enter" to skip to content

How do I run a symbolic link?

How do I run a symbolic link?

To do so, follow these steps:

  1. Connect to your hosting account via SSH.
  2. Use ls and cd to navigate to the directory where you would like the symbolic link to be placed. Helpful Hint. ls will return a list of files in your current location.
  3. Once there, run the command: ln -s [source-filename] [link-filename]

Example

  1. Open Command Prompt. Click on the Windows symbol on the screen or press the Windows button on your keyboard to open the start-up menu. Search cmd or Command Prompt.
  2. Write mklink. Write mklink and specify the option.
  3. Completion. The above statement will appear if the symbolic link is created successfully.

How To Enable using Symbolic Links. The user must be given the “Create Symbolic Links” privilege or be in a group that has been given that privilege. If User Account Control (UAC) is on, any user with the “Create Symbolic Links” privilege that is not in the Administrators group can simply create a symbolic link.

Enable the remote-to-local and remote-to-remote symbolic link evaluations: Open the Group Policy Management console on any domain controller in the target domain: navigate to Start → Windows Administrative Tools (Windows Server 2016 and higher) or Administrative Tools (Windows 2012) → Group Policy Management.

This policy setting is supported on versions of Windows that are designated in the Applies To list at the beginning of this topic. This user right should only be given to trusted users. Symbolic links can expose security vulnerabilities in applications that are not designed to handle them.

If User Account Control (UAC) is on, any user with the “Create Symbolic Links” privilege that is not in the Administrators group can simply create a symbolic link. UAC is normally on. For users within the Administrators group and with UAC on, the user must “Run as Administrator”.

To view the symbolic links in a directory:

  1. Open a terminal and move to that directory.
  2. Type the command: ls -la. This shall long list all the files in the directory even if they are hidden.
  3. The files that start with l are your symbolic link files.

What is a directory junction?

Directory junctions allow you to join folders together so you can map a directory to any local target directory. Imagine you had three folders, c:/folder1, c:/folder2 and c:/documents. Directory junctions can also be created using the Application Programming Interface but you need to write a program.

In computing, a symbolic link (also symlink or soft link) is a term for any file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution.