How to Access iCloud Drive Using Terminal on Mac

Some advanced users may need to access iCloud Drive via Terminal on Mac. Hence, we thought it's apt to make a quick guide about it.

Developers or advanced users may need to access iCloud Drive from the command line on Mac. Though the process is not so straightforward, it’s not difficult either.

So long as you know the command line, you can quickly copy and even move files to iCloud via Terminal on your Mac. Before going ahead with the process, you need to ensure that iCloud Drive is enabled on your Mac. If it’s not already, click on Apple Menu → System Preferences (or simply click on System Preferences icon) → iCloud and make sure it’s enabled. Besides, ensure that you have the proper Internet connection to access iCloud Drive and iCloud Drive files and documents using Terminal.

Sponsored Links

How to Access iCloud Drive Using Terminal on Mac

How to Access iCloud Drive Using Command Line on Mac


The command line path to iCloud Drive in macOS is:

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

Sponsored Links

The “~” tilde is a shortcut for the current users home directory. However, you have the option to illustrate it based on your need.

To access iCloud Drive in the Terminal on your Mac, you need to use “cd” command and then select the directory of the iCloud documents path.

To do so, use the following command:

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

Sponsored Links

Then, press the Return key to access iCloud Drive folder.

That’s it! Now, you will have access to iCloud Drive folder. Now, go ahead with your work.

How to Move Files to iCloud Drive by Terminal in Mac

Using command line, you can also move a file to iCloud Drive. It will upload to iCloud Drive and remove it from its original place. To do so, use the mv command.

mv ~/Desktop/images.jpeg ~/Library/Mobile\ Documents/com~apple~CloudDocs/

Sponsored Links

Now, your files will upload to the iCloud server.

How to Copy Files to iCloud Drive via Terminal on Mac

With the use of cp command, you can copy files to iCloud Drive via Terminal. The copied files are uploaded iCloud.

cp ~/Desktop/images.jpeg ~/Library/Mobile\ Documents/com~apple~CloudDocs/

That’s pretty much it!

Sponsored Links

Your take:

You’d like to take a peek at these posts as well:

Enjoyed this article? Download our app and stay connected with us via Facebook, Twitter, and Google Plus to read more such helpful guides.

Jignesh Padhiyar
Jignesh Padhiyar is the founder of who has a keen eye for news, rumors and all the unusual stuff that happens around iPhone and iPad.


Please enter your comment!
Please enter your name here

Latest Articles

Best iPhone XR Designer Cases: Personalize Your Premium Device Every Day

There is humor, which is not fragile. There is style, which is not snobbish. There is a strength, which is not bland. Here is...

Apple Likely To Sell Massive 35-38 million iPhone XR Units in Q4: Ming-Chi Kuo

Ahead of the release of iPhone XR, experts believe the device is going to be a smash hit of the year. Popular analyst Ming-Chi...

24 Paid iPad and iPhone Apps Gone Free Today – 16 October 2018

iOS Games Gone Free TodayiOS Apps Gone Free TodayWhile there are tons of awesome apps available for free, a number of extraordinary ones come...

21 iPad and iPhone Apps Price Drop – 16 October 2018

What happens when you come to know that one of your favorite iPhone/iPad apps price has just dropped-and available at a huge discount? A...