{"id":15257,"date":"2017-05-16T17:32:50","date_gmt":"2017-05-16T12:02:50","guid":{"rendered":"https:\/\/www.wikitechy.com\/technology\/?p=15257"},"modified":"2017-05-16T17:32:50","modified_gmt":"2017-05-16T12:02:50","slug":"how-to-sync-your-onedrive-account-on-a-linux-computer","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/technology\/how-to-sync-your-onedrive-account-on-a-linux-computer\/","title":{"rendered":"How to Sync Your OneDrive Account on a Linux Computer"},"content":{"rendered":"<p><strong>OneDrive Account on a Linux \u00a0&#8211;<\/strong> OneDrive, Microsoft\u2019s distributed storage service is a really famous offering with regards to distributed storage services. OneDrive empowers us to get to our documents at whatever time, anyplace, on every one of our gadgets. However, there is one big caveat \u2013 no official Linux customer is accessible. Therefore, Linux users have to rely on the web version (which does not provide syncing), or on unofficial clients. There used to be a working informal customer named onedrive-d, be that as it may, it did not keep up anymore. Having said that, there is another unofficial OneDrive client appropriately named onedrive by GitHub user skilion. It has support for manual and automatic sync, real-time file monitoring and resumable uploads. Although the set up involves some tinkering and using the command line, it works well enough for daily usage and does not pose problems.\u00a0 In this way, on the off chance that you are hoping to match up your OneDrive information with your Linux PC, here&#8217;s the means by which to do it:<\/p>\n[ad type=&#8221;banner&#8221;]\n<p><strong><em><u>Note<\/u><\/em><\/strong><strong><em>:<\/em><\/strong><em>\u00a0<\/em><em>This program has been tested under Linux Mint 18. These instructions will work unmodified with Ubuntu 16.04. While getting it to work with other distributions is possible, we haven\u2019t\u00a0covered it in this article.<\/em><\/p>\n<h4 id=\"installing-onedrive-on-linux\"><span style=\"color: #99cc00;\"><strong>Installing OneDrive on Linux:<\/strong><\/span><\/h4>\n<p>Open the\u00a0<strong>Terminal<\/strong>, and run the following commands to install the prerequisite software\u00a0libcurl,\u00a0libsqlite,\u00a0build-essential, and\u00a0git:<br \/>\n<code>sudo apt-get install libcurl4-openssl-dev libsqlite3-dev build-essential git<\/code><\/p>\n<p>After the installation is complete, run the following commands to install the compiler for the D programming language:<\/p>\n<ol>\n<li>sudo wget http:\/\/master.dl.sourceforge.net\/project\/d-apt\/files\/d-apt.list -O \/etc\/apt\/sources.list.d\/d-apt.list<\/li>\n<li>wget -qO &#8211; http:\/\/dlang.org\/d-keyring.gpg | sudo apt-key add &#8211;<\/li>\n<li>sudo apt-get update &amp;&amp; sudo apt-get install dmd-bin<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>We will now download and install the\u00a0<strong>onedrive<\/strong>\u00a0software. In your\u00a0<strong>Home<\/strong>\u00a0directory, download the source code using the following command:<\/p>\n<p>git clone https:\/\/github.com\/skilion\/onedrive.git onedrive_code<\/p>\n<p>&nbsp;<\/p>\n<p>Now, compile and install the software:<\/p>\n<p>&nbsp;<\/p>\n<p><code>cd onedrive_code<\/code><\/p>\n<p>make<\/p>\n<p><code><\/code><\/p>\n<p><code>sudo make install<\/code><\/p>\n<p><code>And you are done.<\/code><\/p>\n<h4 id=\"configuring-your-onedrive-account\"><span style=\"color: #ff6600;\"><strong>Configuring Your OneDrive Account:<\/strong><\/span><\/h4>\n<p>To configure your OneDrive account for the first time, open the\u00a0<strong>Terminal<\/strong>, and\u00a0<strong>run<\/strong><strong>\u00a0<\/strong><strong>onedrive<\/strong>. You will see a prompt with a URL like this:<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-15268\" src=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/05\/1-130.png\" alt=\"How to Sync Your OneDrive Account on a Linux Computer)\" width=\"640\" height=\"440\" srcset=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/05\/1-130.png 640w, https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/05\/1-130-300x206.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Simply\u00a0<strong>copy this URL<\/strong>, and enter it in your web browser of choice. You will be asked for your\u00a0<strong>Microsoft account<\/strong>\u00a0and password. Once entered, you will get the following\u00a0screen:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-15269\" src=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/05\/2-108.png\" alt=\"How to Sync Your OneDrive Account on a Linux Computer)\" width=\"640\" height=\"340\" srcset=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/05\/2-108.png 640w, https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/05\/2-108-300x159.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n[ad type=&#8221;banner&#8221;]\n<p>Select\u00a0<strong>Yes<\/strong>\u00a0here, and\u00a0<strong>copy the URL<\/strong>\u00a0that appears on the following screen:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-15270 size-full\" src=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/05\/3-101.png\" alt=\"How to Sync Your OneDrive Account on a Linux Computer)\" width=\"640\" height=\"160\" srcset=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/05\/3-101.png 640w, https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/05\/3-101-300x75.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Now\u00a0<strong>paste this URL<\/strong>\u00a0in your\u00a0<strong>Terminal<\/strong>\u00a0window, and press\u00a0<strong>Enter<\/strong>. You will notice that it automatically starts syncing your OneDrive account with the\u00a0Onedrive\u00a0folder in your home directory. If you have several gigabytes of data stored in your OneDrive account, be patient because this is going to take a while.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15271\" src=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/05\/4-96.png\" alt=\"How to Sync Your OneDrive Account on a Linux Computer)\" width=\"640\" height=\"481\" srcset=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/05\/4-96.png 640w, https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/05\/4-96-300x225.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<h4 id=\"\"><span style=\"color: #993300;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><\/h4>\n<h4 id=\"basic-usage\"><span style=\"color: #993300;\"><strong>Basic Usage<\/strong><\/span><\/h4>\n<p>Whenever you want to sync your local storage with your OneDrive account on Linux,\u00a0<strong>simply run the command<\/strong><strong>\u00a0<\/strong><strong>onedrive<\/strong>\u00a0from your terminal. As a demonstration, I deleted some images from my OneDrive storage\u00a0using the web app. On my Linux system, I created a text file in the\u00a0Onedrive\u00a0folder. Running the command\u00a0onedrive gives me the following result:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15272\" src=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/05\/5-89.png\" alt=\"How to Sync Your OneDrive Account on a Linux Computer)\" width=\"640\" height=\"438\" srcset=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/05\/5-89.png 640w, https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/05\/5-89-300x205.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<h4 id=\"setting-up-automatic-sync\"><strong><span style=\"color: #99cc00;\">Setting Up Automatic Sync:<\/span><\/strong><\/h4>\n<p>If you wish to automatically keep your OneDrive account in sync, instead of running the command manually every time, you can enable the systemd service. In a terminal, run:<br \/>\n<code>systemctl --user enable onedrive<br \/>\n<code>systemctl --user start onedrive<\/code><\/code><\/p>\n<p><code><code><\/code><\/code><\/p>\n<p>There is a caveat here. Adding or removing files from your local filesystem reflects the changes in your OneDrive account almost instantly. However, the other way round is slightly delayed. This is not a big deal for most people, but can be a problem if you transfer a lot of files regularly.<\/p>\n<p>If you are not sure whether or not a certain file synced or not, you can check the logs. To do that, run:<\/p>\n<p>journalctl &#8211;user-unit onedrive -f<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15273\" src=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/05\/6-83.png\" alt=\"How to Sync Your OneDrive Account on a Linux Computer)\" width=\"640\" height=\"438\" srcset=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/05\/6-83.png 640w, https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/05\/6-83-300x205.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<h4 id=\"excluding-files-and-folders-from-syncing\"><span style=\"color: #ff6600;\"><strong>Excluding Files and Folders from Syncing:<\/strong><\/span><\/h4>\n<p>Let\u2019s say you have a folder filled to the brim with HD videos in your OneDrive account, and you want to avoid syncing that, as it will take up significant bandwidth and space. Maybe you also want to avoid syncing disc images (.iso files). To do this, open the file\u00a0~\/.config\/onedrive\/config\u00a0using your favorite text editor, and modify the\u00a0skip_file\u00a0and\u00a0skip_dir\u00a0sections accordingly:<\/p>\n<p><code>skip_file = \".*|~*|*.iso\"<\/code><\/p>\n<p>skip_dir = &#8220;.*|Videos&#8221;<\/p>\n<p>If you are running the sync service, then you need to turn it off first:<br \/>\n<code>systemctl --user stop onedrive<\/code><\/p>\n<p>After that, run onedrive with the resync option:<br \/>\n<code>onedrive --resync<\/code><\/p>\n<p><code><\/code><br \/>\nyou can re-enable the sync service:<br \/>\n<code>systemctl --user start onedrive<\/code><\/p>\n<h4 id=\"ad-typebanner\">\u00a0[ad type=&#8221;banner&#8221;]<\/h4>\n<h4 id=\"use-onedrive-seamlessly-with-linux\"><span style=\"color: #993300;\"><strong>Use OneDrive Seamlessly with Linux<\/strong><\/span><\/h4>\n<p>Another good Linux OneDrive client to consider is\u00a0<strong>rclone<\/strong>. While it only offers manual sync, it has certain additional features not present in onedrive, such as support for simultaneous, multiple cloud accounts, including, but not limited to OneDrive, Google Drive, Dropbox, Amazon S3 and Yandex. You can get rclone\u00a0<a href=\"http:\/\/rclone.org\/\" target=\"_blank\" rel=\"noopener\">here<\/a>.Well, that\u2019s\u00a0how you can sync a Microsoft OneDrive account with Linux.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Sync Your OneDrive Account on a Linux Computer &#8211; PC &#8211; OneDrive empowers us to get to our documents at whatever time, on every one of our gadgets.<\/p>\n","protected":false},"author":1,"featured_media":18960,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18379,1699,5739],"tags":[45640,45670,45657,45681,45674,45643,45667,45669,45665,22709,45663,45641,45659,22713,45664,45675,45677,45656,45671,45646,45650,45668,45662,45642,45648,45644,25951,45676,45679,45651,45666,45647,45652,45649,45680,22726,45678,45673,45658,45645,22712,22710,45672,45653,45660,45661,45682,45654,45655],"class_list":["post-15257","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-internet","category-linux","category-pc","tag-best-cloud-storage-for-linux","tag-cloud-drive-google","tag-cloud-google-drive","tag-cloud-storage-for-linux","tag-cloud-storage-sync","tag-cloud-sync-software","tag-download-onedrive-app","tag-dropbox-plans","tag-dropbox-storage","tag-dropbox-vs-google-drive","tag-google-drive","tag-google-drive-cloud-storage","tag-google-drive-storage","tag-google-drive-vs-onedrive","tag-google-one-drive","tag-how-does-onedrive-work","tag-how-to-sync-your-onedrive-account-on-a-linux-computer","tag-how-to-use-onedrive","tag-install-onedrive","tag-linux-online-storage","tag-office-365-ubuntu","tag-one-drive","tag-onedrive","tag-onedrive-backup","tag-onedrive-backup-solution","tag-onedrive-backup-tool","tag-onedrive-cloud","tag-onedrive-com-login","tag-onedrive-d","tag-onedrive-desktop-app","tag-onedrive-device-backup","tag-onedrive-file-sync","tag-onedrive-for-busine","tag-onedrive-for-business-linux","tag-onedrive-for-linux","tag-onedrive-google","tag-onedrive-linux","tag-onedrive-online-storage","tag-onedrive-pricing","tag-onedrive-sign-in","tag-onedrive-vs-dropbox","tag-onedrive-vs-google-drive","tag-skydrive-storage","tag-ss-cloud-storage-linux","tag-sync-cloud-storage","tag-sync-drive","tag-sync-onedrive","tag-syncfile-onedrive-cloud-storage","tag-what-is-google-dropbox"],"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/15257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/comments?post=15257"}],"version-history":[{"count":0,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/15257\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media\/18960"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media?parent=15257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/categories?post=15257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/tags?post=15257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}