How to Install OneDrive on Ubuntu 18/19/20 (Linux)

OneDrive Ubuntu

You finally made a switch from Windows to Ubuntu or maybe just giving it a try and need Microsoft OneDrive?

No need to worry, with just a few steps you will be able to use OneDrive on your Ubuntu.

Installing OneDrive on Ubuntu

Before installing let’s update Ubuntu and its repositories.

sudo apt upgrade -y

Installing OneDrive

sudo apt-get install onedrive

The above command will install OneDrive on your system. Next, we will ask Ubuntu (Linux) to run it, so that we can authorize it (login to your OneDrive Account).


This command will start OneDrive which will provide a URI and ask you for a URI in return. Output in your console will look something like this.

$ onedrive Authorize this app visiting:
Enter the response uri:

Just Click on the URI and it will open up in tab in browser for you to log in to your account or copy-paste the link into the browser.

Once you log in it will return a URI (web page will be blank, no need to worry). Copy the URI and paste it into the console in front of “Enter the response uri:”

If everything goes well then you will find an OneDrive directory at $HOME/OneDrive.


Now we have OneDrive up and running but it won’t sync anything as of yet. So we will go through some basic commands that will help you manage your OneDrive.

To start sync (monitor) just run following command.

onedrive -m

This command will start live sync between the local files and files on the server and then download (update) the files.

You have to run the above command every time you restart your Ubuntu.

Some other useful commands are:

-m –monitor

Keep monitoring for local and remote changes

–monitor-interval ARG

The number of seconds by which each sync operation is undertaken
when idle under monitor mode
Configuration file key: monitor_interval (default: 45)

–monitor-fullscan-frequency ARG

Number of sync runs before performing a full local scan of the
synced directory
Configuration file key: monitor_fullscan_frequency (default: 10)

–skip-dir ARG

Skip any directories that match this pattern from syncing


Skip any files that match this pattern from syncing
Configuration file key: skip_file (default: ~*|.~*|*.tmp)

To list all the command run

man onedrive

If you get stuck just leave a comment and I’ll get back to you as soon as possible.

2 thoughts on “How to Install OneDrive on Ubuntu 18/19/20 (Linux)

  1. Riya Bhattacharia

    Is there no official onedrive for ubuntu?

    • Gaurav Yadav

      Currently, there is no official onedrive client for ubuntu (Linux).

Leave a Reply

Let's Work Together

Gaurav Yadav

Web Designer & Developer

Best Website Development Company in Gurugram and Delhi/NCR

Contact Us

58, Chakkarpur
Gurugram, Haryana

Mob: 9873396676

Gaurav Yadav © 2020 All Rights Reserved