Picture of Michael Lee
:wave: Hey hey, I'm @michaelsoolee! I'm a full-stack developer, maker of one too many side projects and dad.

Access iCloud Drive quicker in Terminal by creating a symbolic link (symlink)

Written on May 31, 2019

Accessing iCloud Drive isn’t so obvious from the Terminal because Apple uses this weird path.

~/Library/Mobile\ Documents/com\~apple\~CloudDocs

Fortunately you can use a symbolic link or a symlink so that you could easily access your documents in iCloud Drive from the terminal with something like this,

~/iCloud

You can do this using the link command or its alias ln from Terminal. So let’s say we’ll want to create a symlink to iCloud in your home folder ~. You’ll want to run this command,

ln -s ~/Library/Mobile\ Documents/com\~apple\~CloudDocs ~/iCloud

-s in the command above is the option according to man link the manual pages, is to create a symbolic link.

Then we pass the source folder and then pass in the desired destination folder, which in this case I used ~/iCloud.

So now from the command link, I can easily get to my notes folder in iCloud by typing in this in Terminal,

atom ~/iCloud/notes

Stay in touch

Thanks for reading this article. I'd love to stay in touch and share more tips on programming, design and side projects with you. Sign up and I'll send you my articles straight to your email.