Your cart is currently empty!
How to Install Microsoft OneDrive on Linux
Microsoft doesn’t offer an official OneDrive client for Linux, but that doesn’t mean you’re out of luck. Thanks to open-source projects and a helpful Linux community, syncing OneDrive files on Linux is not only possible — it’s surprisingly smooth.
Here’s a no-nonsense guide to get OneDrive running on your Linux system.
What You’ll Need
- A Linux distro (Ubuntu, Fedora, Debian, Arch, etc.)
- A Microsoft account (personal or business)
- Terminal access with sudo privileges
Step 1: Choose a OneDrive Client for Linux
Your best bet is onedrive
, an open-source command-line client developed by GitHub user abraunegg. It’s reliable, actively maintained, and works well with OneDrive personal, business, and SharePoint.
GitHub repo: https://github.com/abraunegg/onedrive
Step 2: Install Dependencies
Depending on your distro, you’ll need packages like git
, make
, gcc
, and curl
. Here’s how to get them:
Ubuntu/Debian:
sudo apt update
sudo apt install build-essential libcurl4-openssl-dev libsqlite3-dev git
Fedora:
sudo dnf install make gcc libcurl-devel sqlite-devel git
Arch Linux:
Use the AUR package: onedrive-abraunegg
via an AUR helper like yay
:
yay -S onedrive-abraunegg
Step 3: Download and Build the OneDrive Client
For distros other than Arch:
git clone https://github.com/abraunegg/onedrive.git
cd onedrive
./configure
make
sudo make install
Step 4: Authenticate Your Microsoft Account
Run the following command to set up authentication:
onedrive
This will print a URL. Open it in your browser, sign in to your Microsoft account, and paste the response URL back into the terminal.
Step 5: Sync Your Files
To do a manual sync:
onedrive --synchronize
To monitor and sync continuously:
onedrive --monitor
Optional: Enable Automatic Sync on Startup
Systemd (for most modern distros)
Enable the systemd service to run the client on boot:
systemctl --user enable onedrive
systemctl --user start onedrive
To make sure systemd user services work correctly, you might need to enable lingering:
sudo loginctl enable-linger yourusername
Step 6: Customize Your Sync Settings
Edit the config file at:
~/.config/onedrive/config
You can choose specific folders to sync, exclude files, and more. The config file is well-documented, so tweak it as needed.
Final Thoughts
OneDrive on Linux isn’t plug-and-play like it is on Windows, but with the onedrive
client, it’s solid, fast, and reliable. Whether you’re running Ubuntu, Fedora, or Arch, syncing your cloud files is just a few commands away.
Got questions or hit a snag? Drop a comment or check out the GitHub page for detailed troubleshooting.