Difference between a Symbolic Link and a Finder Alias in macOS

A Symbolic or Soft Link is a traditional Unix link to an original file or directory which  can reside anywhere on the filing system, the linked file when opened as a file or directory has the same contents as the original and if you edit the linked file or add content to the linked directory it will be as so that you are doing it to the original. It is however different then a regular alias created in the finder of macOS.

Symbolic Link (Command Line)

You create a symbolic link on the command line using the command ln with a -s parameter like so:

ln -s target-file-folder alias-file-folder

So you target the destination then the alias, which will be created.

Lets say you want an alias of your Desktop folder in your home directory you would use the command

ln -s ~/Desktop ~/Desktop-copy

If you run an ls command on the home directory you will see:

[email protected] 33 neilg staff 1056 27 Apr 16:01 Desktop
lrwxr-xr-x 1 neilg staff 20 27 Apr 16:11 Desktop-copy -> /Users/neilg/Desktop

You can see the symbolic link pointing to the target directory. If the target file/folder is moved the symbolic link will no longer work.

Desktop Alias (Finder)

Macos Make Alias

Right-click – Make Alias

 

There are 3 ways to create an alias in the Finder of macOS, you can right-click a file or folder (if you have right-click enabled) or select a file/folder then use the File Menu > Make Alias or use a short cut key ‘control’ + ‘command’ + ‘a’.

The good thing about Finder alias and target file/folder is that you can move either of them and the link is still maintained.

Command Line Alias

Also for clarity there is a command line command called ‘alias’ which is different to the above 2, it is used to alias longer command line commands to shorter ones typically in the bash or Z Shell environments.

1 Comment

  1. Clement on May 28, 2021 at 7:14 am

    I read the article in hope to read a discussion about how one sees the other. I guess your article keeps it simple, that’s good.

    If you wanted to write more, maybe elsewhere I’ve got (not burning) questions.
    What does referring to a finder alias to in a command line argument ?
    What does the finder make of a soft link ?

Leave all Comment