The big practical difference is:
- aliases are defined in your profile scripts, they are usually specific to you and they only work in the shell.
- When an executable is linked to a new name in a bin directory then it's a system command available to all processes and users
Detail
An alias can include options and arguments, letting you set your preferred default options for a command:
alias ll='ls -l'
and has nothing to do with files.
A symbolic link creates an entry in the file system that refers to some other file in the file system:
link -s ~/somedirectory/mydoc.txt ~/someotherdirectory
will create a link in someotherdirectory to mydoc.txt
However.
If a link is used for an executable file then it can give a new name for a command, just as alias can. For instance on my system ls -l /usr/bin/vi
says
lrwxr-xr-x 1 root wheel 3B 19 Nov 2019 /usr/bin/vi -> vim
So now vi
is an executable command that is identical to vim
. Similarly, many systems have both python2
& python3
installed, and then python
will be symlink to one of them.