How to Install OneDrive on Ubuntu [16 Simple Steps]

Written by

Reviewed by

Last updated: May 22, 2024

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.

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

Managing files across multiple devices can be challenging, especially if you use different operating systems. OneDrive offers a solution by providing seamless cloud storage and synchronization. In this post, I’ll show you how to install OneDrive in Ubuntu. You’ll get step-by-step instructions, and I’ll explain the benefits of using OneDrive on Ubuntu. By the end, you’ll be able to access your files easily, enhance productivity, and ensure your data is backed up and secure.

How to Install OneDrive on Ubuntu

To install OneDrive on Ubuntu, first, open a terminal and run sudo apt-get install build-essential libcurl4-openssl-dev libsqlite3-dev pkg-config git to install dependencies. Next, clone the repository with git clone and navigate into it using cd onedrive. Then, build and install OneDrive Linux with ./configure, make, and sudo make install. Finally, authenticate your account by running onedrive and following the prompts.

Follow this step-by-step guide to install OneDrive on Ubuntu:

  1. Open a Terminal window on your Ubuntu system.
opening terminal 19
  1. Install the dependencies required for OneDrive by running the following command:
sudo apt-get install build-essential libcurl4-openssl-dev libsqlite3-dev pkg-config git
  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:
git clone
  1. After the execution of the command, the OneDrive repository will be installed.
cloning onedrive repository
  1. Navigate to the newly created OneDrive directory:
cd onedrive
  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
  1. Configuring OneDrive for synchronization.
build and install onedrive
  1. Authenticate your OneDrive account by executing the following command:
./onedrive --synchronize
  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 for 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.

Ubuntu Install OneDrive: In a Nutshell

In this article, I walked you through the method to install OneDrive Ubuntu: the OneDrive Client Installation Method. This step-by-step guide ensure a smooth setup process, allowing you to enjoy seamless file access, enhanced productivity, and reliable cloud storage on your Ubuntu system.

For more tips and tutorials, consider reading about:

  • How to install and configure OpenSSH on Ubuntu, which will help you securely manage remote servers and enhance your system’s security.
  • Setting or changing the time zone in Ubuntu, ensuring your system’s time settings are accurate, which is crucial for scheduling and time-based tasks.
  • Creating desktop shortcuts on Ubuntu, making accessing your frequently used applications more convenient and improving your workflow.

Frequently Asked Questions

Can I access my OneDrive files offline on Ubuntu?

Yes, you can access your OneDrive files offline on Ubuntu. Once synced, OneDrive files are stored locally on your system in the OneDrive folder. You can access these files anytime, even without an internet connection. Any changes made offline will sync automatically the next time you connect to the internet.

How do I set up OneDrive to sync only specific folders?

To set up OneDrive to sync only specific folders, edit the configuration file located at ~/.config/onedrive/config. Use the sync_dir option to specify the directories you want to sync. You can exclude other directories by adding their paths under the skip_file option. Save the file and restart the OneDrive client.

Can I use multiple OneDrive accounts on the same Ubuntu system?

Yes, you can use multiple OneDrive accounts on the same Ubuntu system. Create separate configuration files for each account in different directories. Launch separate instances of the OneDrive client with the --confdir option, pointing to each configuration file. This way, you can manage multiple accounts simultaneously.

How do I increase the sync frequency of OneDrive on Ubuntu?

To increase the sync frequency of OneDrive on Ubuntu, edit the systemd service file or use a cron job to run the OneDrive client at your desired intervals. Modify the ExecStart command in the service file or set up a cron job with the desired frequency to ensure more frequent synchronization.

What should I do if OneDrive stops syncing on Ubuntu?

If OneDrive stops syncing on Ubuntu, check the log files for errors, ensure your internet connection is stable, and verify that the OneDrive service is running. Restart the service using systemctl –user restart onedrive. If issues persist, re-authenticate your account or reinstall the OneDrive client to resolve the problem.



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