How to Install OneDrive on Ubuntu [16 Simple Steps]

Written by

Reviewed by

Last updated: June 26, 2023

Expert verified

SVG Image


To install OneDrive on Ubuntu, you can follow these steps:

  1. Open a Terminal window on your Ubuntu system.
  2. Install the required dependencies for OneDrive using the command: sudo apt-get install build-essential libcurl4-openssl-dev libsqlite3-dev pkg-config git.
  3. Clone the official OneDrive repository by running the command: git clone
  4. Navigate to the cloned OneDrive directory using the command: cd onedrive.
  5. Build and install OneDrive by executing the following commands in order: ./configure, make, and sudo make install.

Discover the five benefits of installing OneDrive on Ubuntu, including universal file access, seamless synchronization, effortless collaboration, data backup and recovery, and enhanced file management. With OneDrive, you can unlock the potential of cloud storage on Ubuntu, enabling efficient workflows, secure data management, and seamless collaboration across devices.

Read the guide below for a step-by-step guide to install OneDrive on Ubuntu and the benefits of installing OneDrive.

OneDrive is a popular cloud storage solution that Microsoft offers, allowing you to store, sync, and share files across multiple devices. With the growing popularity of Ubuntu and its dedicated user base, integrating OneDrive with Ubuntu can significantly enhance your cloud storage experience. With OneDrive’s universal accessibility, effortless file synchronization, collaborative features, data backup capabilities, and enhanced file management, you’ll unlock a world of possibilities on Ubuntu. In this comprehensive guide, I will walk you through installing and using OneDrive on Ubuntu and highlight the top benefits of installing OneDrive on Ubuntu.

How to Install OneDrive on Ubuntu

To install OneDrive on Ubuntu, ensure that your system meets the following requirements: a compatible version of Ubuntu, a stable internet connection, sufficient storage space for syncing files, and the ability to run the necessary installation commands and scripts. Follow these instructions carefully to ensure a successful setup.

  1. Open a Terminal window on your Ubuntu system.
opening terminal 19
  1. Install the dependencies required for OneDrive by running the following command:
<strong>sudo apt-get install build-essential libcurl4-openssl-dev libsqlite3-dev pkg-config git</strong>
  1. The command will install all the required dependencies.
installing required dependencies for onedrive 1
  1. Clone the official OneDrive repository by executing the following command:
<strong>git clone</strong>
  1. After the execution of the command, the OneDrive repository will be installed.
cloning onedrive repository
  1. Navigate to the newly created OneDrive directory:
<strong>cd onedrive</strong>
  1. The command will take you to the OneDrive repository directory.
navigating to onedrive directory
  1. Build and install OneDrive by running the following commands:
</strong>sudo make install</strong>
  1. Configuring OneDrive for synchronization.
build and install onedrive
  1. Authenticate your OneDrive account by executing the following command:
<strong>./onedrive --synchronize</strong>
  1. The command will provide a link to authenticate your OneDrive account.
authenticating onedrive account
  1. This will open a browser window where you can sign in to your Microsoft account and grant permissions to OneDrive.
loging to onedrive account
  1. A blank page will appear, copy the URL of that page.
copying URL from the blank page
  1. Paste the copied URL in the Terminal window. Once authenticated, OneDrive will start synchronizing your files.
syncing onedrive folder
  1. By default, OneDrive will create a folder named OneDrive in your home directory. 
OneDrive folder location
  1. In this folder, you can access and manage your synced files.
synced files

5 Benefits of Installing OneDrive on Ubuntu 

Installing OneDrive with Ubuntu unlocks a lot of advantages, elevating your cloud storage experience to new heights. Enjoy universal access, seamless synchronization, collaboration capabilities, data protection, and efficient file management, making OneDrive a valuable addition to your Ubuntu ecosystem. Let’s explore the top five benefits of installing OneDrive on Ubuntu:

  • 🌐 Universal Access to Files from Anywhere: With OneDrive on Ubuntu, you gain universal access to your files from anywhere in the world. Whether you’re using Ubuntu, Windows, macOS, or even a mobile device, you can effortlessly sync and retrieve your files, ensuring seamless productivity across multiple platforms.
  • 💾 Sync Files Across Multiple Devices: OneDrive enables hassle-free file synchronization across all your devices. By installing OneDrive on Ubuntu, you can keep your files updated and consistent across your desktop, laptop, smartphone, or tablet. Any changes to your files are automatically synced, ensuring you have the latest versions at your fingertips.
  • 🤝 Collaborate and Share Files Effortlessly: OneDrive simplifies collaboration by allowing you to share files and folders with others seamlessly. Install OneDrive on Ubuntu, and you’ll be able to collaborate with colleagues, friends, or family members in real time. Share files, grant permissions, and work together on projects effortlessly, enhancing productivity and streamlining teamwork.
  • 🔒 Data Backup and Recovery: Installing OneDrive on Ubuntu provides an additional layer of data protection. With OneDrive’s built-in backup and recovery capabilities, you can protect your important files from loss or damage. In case of unforeseen events, such as hardware failure or accidental deletion, you can easily recover your files from OneDrive, ensuring peace of mind and minimal disruption to your workflow.
  • Enhanced File Management and Organization: OneDrive on Ubuntu empowers you with advanced file management and organization features. Utilize features like file versioning, which allows you to access previous versions of files, enabling easy retrieval of lost or modified content. Additionally, OneDrive’s search functionality helps you locate specific files quickly, making file management on Ubuntu efficient and effortless.

To Sum Up

I have provided a step-by-step guide to install OneDrive on Ubuntu, allowing you to experience advanced functionality. In this guide, you will also learn about the benefits of OneDrive that help you to access your files from anywhere, enjoy seamless synchronization, and enhance your productivity.

To deepen your knowledge in this domain, consider exploring related articles such as Comparing OneDrive, Google Drive, and Dropbox, Top Productivity Applications for Ubuntu Users, and How to Automate Tasks on Ubuntu. By exploring these articles, you can enhance your understanding of Ubuntu and discover additional ways to optimize your usage of OneDrive.

Frequently Asked Questions

Can I access my OneDrive files offline on Ubuntu?

Yes, you can access your OneDrive files offline on Ubuntu. OneDrive offers the convenient option to mark specific files or folders for offline access, ensuring you can view and edit them even when you’re not connected to the internet. To enable offline access, simply right-click on the desired file or folder within the OneDrive folder and select the Make available offline option. This will download a local copy of the file or folder to your Ubuntu system, allowing you to work on it seamlessly without an active internet connection. Once you regain connectivity, any changes made offline will be automatically synced to your OneDrive cloud storage.

Can I synchronize multiple OneDrive accounts on Ubuntu?

Absolutely! Ubuntu allows you to synchronize multiple OneDrive accounts concurrently, granting you the flexibility to manage files from different OneDrive accounts on the same system. Each OneDrive account will have its own dedicated folder within your home directory, ensuring a segregated storage environment. To synchronize multiple accounts, follow the installation and authentication process for each account separately. Once authenticated, each account’s files will be synced to their respective OneDrive folders. This capability is especially useful for individuals with personal and work-related OneDrive accounts, enabling effortless organization and access to files from various sources within your Ubuntu system.

Does OneDrive on Ubuntu support selective sync?

Yes, OneDrive on Ubuntu supports selective sync, empowering you to choose which files and folders you want to synchronize with your Ubuntu system. By default, all files and folders within the OneDrive folder are synced, ensuring that your entire OneDrive storage is accessible locally. However, if you wish to save local storage space or exclude specific files or folders from being synced, you can customize the selective sync settings. With selective sync, you have the flexibility to prioritize essential files and folders for local availability while keeping other content exclusively in the cloud. This feature provides efficient control over your OneDrive storage utilization on Ubuntu.

Can I access previous versions of files on OneDrive using Ubuntu?

Absolutely! OneDrive on Ubuntu allows you to access previous versions of files stored in your OneDrive cloud storage. If you need to recover an older version or review the changes made over time, simply right-click on the file of interest within the OneDrive folder. From the contextual menu, select the Version history option, which will open a comprehensive interface displaying a list of previous versions and revisions of the file. You can browse the versions, preview their contents, and restore a specific version if needed. This powerful versioning capability ensures you can effortlessly track and manage the evolution of your files stored on OneDrive, directly from your Ubuntu system.



Ojash is a skilled Linux expert and tech writer with over a decade of experience. He has extensive knowledge of Linux's file system, command-line interface, and software installations. Ojash is also an expert in shell scripting and automation, with experience in Bash, Python, and Perl. He has published numerous articles on Linux in various online publications, making him a valuable resource for both seasoned Linux users and beginners. Ojash is also an active member of the Linux community and participates in Linux forums.



Akshat is a software engineer, product designer and the co-founder of Scrutify. He's an experienced Linux professional and the senior editor of this blog. He is also an open-source contributor to many projects on Github and has written several technical guides on Linux. Apart from that, he’s also actively sharing his ideas and tutorials on Medium and Attirer. As the editor of this blog, Akshat brings his wealth of knowledge and experience to provide readers with valuable insights and advice on a wide range of Linux-related topics.

Share this article
Shareable URL
Prev Post

How to Set Date and Time on Linux: A Comprehensive Guide with 3 Easy Methods

Next Post

4 Best Methods to Change or Set User Password in Linux

Leave a Reply

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

Read next