Install OneDrive For Linux to Sync [Complete Instruction]

Written By Farhan Bin Matin

Since Windows is the primary operating system of Microsoft, OneDrive Client is pre-installed into OS. It’s true that Microsoft also has a client app for the Mac OS, ditching Linux into a void.

Microsoft may never develop a OneDrive client for Ubuntu or any Linux distro. But that doesn’t mean you can’t at least use OneDrive in a browser of Linux. It’s just the thing you haven’t been allowed to sync files officially. Is there any other way, you may wonder?install-onedrive-for-linux-to-sync

Yes, there is, and I will share some methods in this article. So stick to it and try installing those with caution.

Is OneDrive Officially Available for Linux?

Linux is like the arch-nemesis of Microsoft. Especially, regular Linux users claim that Linux is far better than Windows OS in almost every aspect. Honestly speaking, it IS better and more reliable in most cases.

As a result, you’ll never have the official OneDrive app support because OneDrive is a part of Office 365. Even if Libre Office can carry the MS Office scarcity, OneDrive has zero official getaway, leaving no choice but to depend on Third-party applications & services.

Although there is slim doubt and anxiety about unofficially using OneDrive, most of the Linux services are Open-Source.

How to Install OneDrive in Linux/Ubuntu using Terminal?

Since Microsoft doesn’t allow official support for OneDrive, no flatpack or official repository exists. You can not install a OneDrive Client from Linux/Ubuntu app store or use the terminal to fetch flatpack from the official website.

So the only way to install OneDrive in a Linux system is through another 3rd-party service. Most of those are open-source and seem safe. But you’ll see a permission request while signing into the Microsoft account. permission-request-page-s

However, you can access all the OneDrive files from a browser; you can’t Sync files or folders without client support. To install OneDrive Client-like service in your Linux/Ubuntu OS, precisely follow the instructions below.

Here is the step-by-step process to install OneDrive for Linux/Ubuntu systems:

  • Launch the Terminal with Ctrl + Alt + T shortcut.
  • Run these commands in the given order.

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
sudo apt-get autoremove -y
sudo apt-get autoclean -y
  • Restart your system with the command ‘reboot.’
  • Reopen the terminal and paste this command to add a release key; Since Ubuntu 22.04 LTS requires using the OpenSuSE Build Service Repository to install OneDrive Client.

wget -qO – https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_22.04/Release.key | gpg –dearmor | sudo tee /usr/share/keyrings/obs-onedrive.gpg > /dev/null
  • Run this command to add the required repository.

echo “deb [arch=$(dpkg –print-architecture) signed-by=/usr/share/keyrings/obs-onedrive.gpg] https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_22.04/ ./” | sudo tee /etc/apt/sources.list.d/onedrive.list
  • Update the apt cache with “sudo apt-get update” installation-completion-window
  • Run this final command to install OneDrive.
sudo apt-get update

Note: These steps will work for the Debian-based Linux distros. To install the OneDrive client on another distribution.

Manjero & arch based distros can run this command to install OneDrive Client:

pamac build onedrive-abraunegg

It’s the installation process of OneDrive clients on different Linux distros, but to sync files and folders, there is another set of commands and procedures.

How to Sync With OneDrive in Ubuntu

Since browsing OneDrive files are easily accessible through a browser, the OneDrive application in a Linux/Ubuntu is required for the sync feature. Unlike the usual sync folder setup process, Linux users can only set up sync folders through commands in the Terminal.

After the successful OneDrive client service installation, follow these processes to connect Sync folders with OneDrive. But first, you need to log in and give permission for this service.

Signing in is first for the folder sync purpose, so you must sign in before setting up a sync folder. Run this command to let the service help you with a sign-in link. Because you can’t browse through the Terminal.

onedrive display-sync-status
  • Copy the link in the Terminal window and paste it into a browser. login-url-copy
  • Paste the response url after the Enter the response url section in the Terminal. generated-url-in-browser
  • Accept the permission request in the browser. permission-request-page-s
  • Run this command below to add a sync folder for OneDrive.
onedrive destination-directory [FILEPATH] –synchronize
  • Check if your Folder has been added to Sync with this command- “onedrive display-sync-status

You can add more folders to Sync with OneDrive by changing the FILEPATH in the above script.

But you can’t add multiple accounts like Windows.

You can also uninstall the service and stop OneDrive Sync anytime you need. But you’ll also need to revoke access from OneDrive manually. This article’s later section might be useful in such a case.

What is the Uninstallation Process of OneDrive in Ubuntu / Linux?

You may no longer need the OneDrive Client or feel unsafe with the access you provided to the 3rd-party service. Now you are thinking of evicting the OneDrive from your System. The uninstallation process of OneDrive is pretty simple. You don’t need to run many scripts or follow many steps, either. To uninstall OneDrive from the system, run the code below.

$ sudo apt-get remove onedrive

You are done with the OneDrive client you installed to sync your files. You may seem that you have gotten rid of this.

Unfortunately, it’s not. The service still has the authentication to your OneDrive through the cloud service. But no worries, you can manually detach the service too. Follow the link below and easily remove this service from the Microsoft App Center.

https://myapps.microsoft.com/

Paste this link into the browser where your Microsoft ID is logged in already. Or you can log in again. Now scroll down and find OneDrive Client for Linux. Then click on the three dots and select Remove. linux-onedrive-access-removal

There you go; your Microsoft account is no longer accessible from the third-party service. Furthermore, you can audit and remove other unwanted services from here also.

FAQs

What are the two disadvantages of OneDrive?

Microsoft OneDrive has a major sharing access issue with non-cross-platform support.

What is the difference between Microsoft Cloud and OneDrive?

The OneDrive itself is the cloud storage solution/service from Microsoft and extends features with SharePoint.

Does OneDrive use a lot of CPU?

OneDrive usually requires a small portion of CPU resources to sync files. Although it can utilize a significant amount of CPU, it’s less often.

Verdict

Whenever you have to trust third-party services, do it cautiously because there is no legal organization for accountability. The services can even stop responding at any time without proper notice. So I recommend avoiding those if it’s not too necessary. Instead, you can use OneDrive through a browser sacrificing the Sync feature.

Let us know your opinion on this article and if you find this helpful & informative.

About The Author
Farhan is a tech researcher and enthusiast. He’s been into tech and gaming since he got a PS2 in his childhood.Currently, he’s almost done with his undergrad.Besides testing and researching geeky stuff, Farhan has an utmost passion for photography.

Leave a Comment