Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
me$ ln -s ~/x/y/ ~/Desktop/
ln: /Users/me/Desktop//: File exists

Why does this attempt at creating a symbolic link to ~/x/yon the Desktop now work? The only way I can seem to get something like a symbolic link is this way:

ln -s * ~/Desktop/

I'm confused, this was really simple in Ubuntu.

share|improve this question
up vote 2 down vote accepted

Alternatively, you can do

ln -s ~/x/y ~/Desktop/

(note there's no slash '/' character after ~/x/y/).

I think the error message is not the most informative, but I understand it as that if you're putting a trailing slash, you're referring to the content of your directory (in this case ~/x/y), but if you omit it, you're referring to the directory itself.

share|improve this answer
Of course this one doesn't. You've done ln -s ~/Desktop/symlink ~/Desktop/ which makes a symlink onto itself (there already is a ~/Desktop/symlink file in there, you can't link it to itself). If you do ln -s ~/tmp/symlink ~/Desktop/ it should work. – mike Oct 27 '13 at 20:36
Hmm, now it lets me make the symlink, but the symlink shows the default file icon (instead of the folder icon) and attempting to open the symlink shows an error – grgarside Oct 27 '13 at 20:39
Again, can you paste in the commands and their output exactly as you've typed them? Difficult to tell without seeing them. – mike Oct 27 '13 at 20:56
Here's my Terminal output. Getting the same error as @Tor when attempting to open symlink. – grgarside Oct 27 '13 at 20:57
Hmm... I'll be honest with you. I've done the exact same thing on my system (OSX 10.9) and it works perfectly... beats me! – mike Oct 27 '13 at 21:01

ln -s ~/x/y/ ~/Desktop/ attempts to symlink ~/Desktop/ to ~/x/y/, which does not appear to be what you wanted, and is indeed not possible since ~/Desktop exists (as the error states).

To create a symlink to ~/x/y/ inside ~/Desktop/, you need to give it a name like so:

ln -s ~/x/y/ ~/Desktop/mysymlink

This creates a symlink mysymlink on your desktop that links to ~/x/y/.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.