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.

iCloud Drive path in Terminal

Written on May 31, 2019

Recently I started putting my markdown notes into iCloud Drive instead of Dropbox. I’m already part of the Apple ecosystem and paying for an iCloud subscription so I thought it made sense to move my markdown notes there.

One of the common commands I run on my MacBook Pro in Terminal is my editor of choice and then the path to my notes folder. It was pretty obvious before when all my notes was in Dropbox, but it wasn’t so obvious with iCloud Drive.

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

~/ being the user’s home folder.

So now if you want to say open up a folder called notes in iCloud Drive using Atom you’d run this command.

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

Not the prettiest or even the most obvious path and I hope Apple moves it to make it more obvious in the future.

Alternatively, you could create a symbolic link or symlink for short so you could access your iCloud Drive from the Terminal with a cleaner and more obvious path.

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.