How to Create Symbolic Links at the Command Line of Mac OS X

If you want to create and set a symbolic link at the command line in OS X, you will need to use the ln command with the -s flag (if you don't use the -s flag a hard link is set). You'll need to launch a terminal session in order to follow along.

How to Create a Symbolic Link

Here is the syntax for creating a symbolic link:

ln -s /path/to/original_file /path/to/symlink_file

After running this command the symlink will point to the original location. Depending on which directory you are setting up the link in you may need to sudo:

sudo ln -s /path/to/original_file /path/to/symlink_file

How to Remove a Symbolic Link

rm is your friend => but use it wisely:

rm /path/to/symlink_file

You can also use unlink:

unlink /path/to/symlink_file