How to Install Microsoft OneDrive on Ubuntu

If you’ve moved from Windows to a Linux operating system, there is a good chance you have used Microsoft OneDrive. It’s built into Windows 10 and 11, which means a good chunk of your personal files have been synced there.

With Linux operating systems, there is no pre-installed OneDrive; there isn’t even an official app. So, just how do you get your data from OneDrive to your Linux PC? The answer is a dedicated piece of software: OneDrive Client for Linux, compatible with all major distros.

Why Would You Need OneDrive on Linux?

Linux has an odd relationship with big-name cloud storage services. Some offer Linux-compatible clients, but it’s often as easy to set up your own cloud with ownCloud or NextCloud.

But that doesn’t mean you shouldn’t use OneDrive on Linux. While it is proprietary and this might upset your open source sensibilities, you may have history with OneDrive. Getting your data away from Microsoft’s servers means being able to access it in the first place. Accessing OneDrive from your Linux OS is the way to do this, and it’s easier than installing Microsoft Office on Linux.

Opening OneDrive in your browser is an option, but it is incredibly slow and not worth the time.

My reason for doing this is straightforward. After years of paying a monthly subscription for Office 365, I’ve finally decided I no longer need it. With 50GB of storage that I don’t want to lose (including many photos of my children snapped on Windows Phone devices), syncing the data is a priority.

(The “free” storage option is just 5GB.)

Use the Best Option: OneDrive Client for Linux

Several OneDrive clients have been released for Linux over the years, but most have been abandoned. One project that is still in development is OneDrive Client for Linux.

This software is available from GitHub and can be installed on pretty much any Linux distribution. All the steps are provided on the GitHub page to install it in just a few minutes. To demonstrate how straightforward it is, the section below will demonstrate how to install OneDrive Client for Linux on Ubuntu 22.04 LTS.

With this software installed, you don’t get sneaky access to OneDrive. This is a fully-fledged OneDrive Linux client, at least as good as the one on Android if not the actual Windows OneDrive client.

Among the features of OneDrive Client for Linux are state cachinge, real-time file monitoring and syncing, file upjload and download validation, traffic rate limiting, and resumable uploads. The software supports free OneDrive, subscriber OneDrive, OneDrive for Business, national cloud deployments (e.g. US Government) and other Office 365 variants, SharePoint and Office 365 libraries, and shared folders.

In short, if you need OneDrive access on Linux–short-term or long-term–you need to use OneDrive Client for Linux.

Install the OneDrive Client for Linux on Ubuntu 22.04 LTS

While OneDrive Client for Linux works with most distros, this following steps demonstrate how to install it on Debian-based systems (specifically Ubuntu 22.04 LTS).

Start by ensuring your system is fully up to date.

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

After updating, you should reboot your system


Installing the OneDrive Client for Linux on Ubuntu 22.04 LTS requires use of the OpenSuSE Build Service Repository. Start by adding the release key:

wget -qO - https:

Next, add the repository:

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/obs-onedrive.gpg] https:

You should then update the apt cache:

sudo apt-get update

Finally, install the OneDrive Client for Linux:

sudo apt install

Note that steps differ slightly across distros. For example, different key and respository commands (based on the version) are required for Ubuntu 22.10.

Installing OneDrive for Linux on Other Distros

As noted, the steps above are for Ubuntu.

However, Arch and Manjaro can use pamac:

pamac build onedrive-abraunegg

The software can also be installed from source. Learn more on the OneDrive Client for Linux’s GitHub.

How to Sync OneDrive to Linux

OneDrive Client for Linux is by default a command-line tool. Various commands are included, which you can access using the help command:


This is quite a list of options, with the most common summarized at the top of the list.

To sync OneDrive to Linux, you need a single command:

onedrive destination-directory [FILEPATH] --synchronize

Simply specify your intended file path for your data, and note the double dash preceding the synchronize command. As long as the target destination has enough storage space, the data will sync from your OneDrive account to Linux.

To enable this to occur, you will need to input your credentials. The OneDrive Client for Linux app will display a link to open in your browser. After signing in to your Microsoft account, copy the URL (the page will typically be blank) and paste it into the terminal window where required. Authentication should then be completed.

Meanwhile, you can confirm the sync status (should new data be added or files removed) with

onedrive display-sync-status

Everything you need for using OneDrive of any scale and distribution can be found in the help file.

Go Mouse Driven With OneDriveGUI

Should this prove inadequate, or you’re not familiar enough with the command line, you can use the OneDriveGUI tool instead. This is a front-end for OneDrive Client for Linux that provides a mouse- and keyboard-driven interface.

Start by heading to the OneDriveGUI GitHub and downloading the AppImage. (What is an AppImage file?)

Download: OneDriveGUI (Free)

Once that has done, open a terminal window to the download location and enter:

chmod +x ./OneDriveGUI-[VERSION]-x86_64.AppImage

Be sure to swap [VERSION] with the version of the OneDriveGUI AppImage download file.

(A version of OneDriveGUI for Arch Linux is also available.)

Using OneDriveGUI requires that you first create a profile. Following this, specify the file path for the directory if you have already started a sync with the terminal tool.

Create a profile for OneDrive on Linux

Once this is done, authentication must be completed (even if you have already done so in the OneDrive Client for Linux). This is a more attractive interface, but the process is the same. You’re then ready to start using the OneDrive Client for Linux in a more traditional desktop setting.

OneDrive Client for Linux GUI interface

OneDrive for Linux Just Works

While the command line interface isn’t too bad, the OneDriveGUI obviously makes OneDrive Client for Linux more usable. The app has everything you need to get your data off OneDrive and sync it to your preferred cloud. Meanwhile, if that seems too effort, you can continue using OneDrive with this software.

However, given how often Microsoft revises authentication methods for its systems, this might not be a good long term plan.

Regardless, OneDrive Client for Linux is a great way to access OneDrive data and sync it to your Linux PC.

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *