Create Symbolic Link using Terminal Command


Create Symbolic Link using Terminal
Create Symbolic Link using Terminal

If you want to create a Symbolic Link using macOS or Linux terminal command you can make use of the ln command.

LN(1)            User Commands                  LN(1)

NAME
       ln - make links between files

SYNOPSIS
       ln [OPTION]... [-T] TARGET LINK_NAME
       ln [OPTION]... TARGET
       ln [OPTION]... TARGET... DIRECTORY
       ln [OPTION]... -t DIRECTORY TARGET...

DESCRIPTION
In the 1st form, create a link to TARGET with the name LINK_NAME.  
In the 2nd form, create a link to TARGET in the current directory.  
In the 3rd and 4th forms, create links to each TARGET in DIRECTORY.  
Create hard links by default,  symbolic links with --symbolic.  
By default, each destination (name of new link) should not already exist.  
When creating hard links, each TARGET must exist.  
Symbolic links can hold arbitrary text;  if later resolved, 
a relative link is interpreted in relation to its parent directory.

Syntax: ln -s source-path destination-path

Example:
ln -s /usr/bin/ /mnt/d/Users/c2c/Desktop/