onedrive in Linux
The linux OneDrive client https://github.com/abraunegg/onedrive seamlessly supports OneDrive Personal, OneDrive for Business, OneDrive for Office365, and SharePoint Libraries. See also the GUI for the OneDrive client: https://github.com/bpozdena/OneDriveGUI.
Setup
Install (Ubuntu)
Follow the instructions:
wget -qO - https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_24.04/Release.key | gpg --dearmor | sudo tee /usr/share/keyrings/obs-onedrive.gpg > /dev/null
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/obs-onedrive.gpg] https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_24.04/ ./" | sudo tee /etc/apt/sources.list.d/onedrive.list
sudo apt update && sudo apt install --no-install-recommends --no-install-suggests onedriveAuthorize the Application
Run onedrive and visit the listed links.
onedriveShow config
onedrive --display-configCheck if onedrive runs
onedrive --sync --dry-runThe default folder for OneDrive files is ~/OneDrive.
If everything is OK, then download the OneDrive files
onedrive --sync --verboseSet maximal number of watched files
The onedrive client will watch a lot of files for synchronization and they may exceed the system limit (e.g., 65536). You can check the limits via:
sysctl fs.file-maxfor the maximal number of files. And
sysctl fs.inotify.max_user_watchesfor the maximal number of file watches.
You can increase the value by editing /etc/sysctl.conf
fs.inotify.max_user_watches=1048576Run onedrive client as a service
systemctl --user enable onedrive
systemctl --user start onedriveTo check the service’s status:
systemctl --user status onedrive.serviceTo view the systemd application logs:
journalctl --user-unit=onedrive -fThe onedrive client will run in the monitor mode (onedrive --monitor), checking the file changes from local and remote and update them periodically.