I can never remember the order of arguments for the ln command (link command).

The easiest way to think about it is to rethink of the “cp” (copy command) instead of “cp source destination” think of it as “cp existing new“. With symlinks, it is hard to comprehend what is the source and what is destination. Switching your thinking to understanding what exists and what will be new helps. So the argument order is just like it is with cp, existing then new. “ln -s existing new” does the trick.

Rule of thumb:

Also apparently, I am not the only one that has troubles with this as there is this link – https://news.ycombinator.com/item?id=1984456 . I stole the trick of the top comment and made an article, now I am bound to not forget (I hope).

The end

Leave a Reply

Your email address will not be published. Required fields are marked *