OneDrive on Linux
Install
sudo dnf install onedrive
Login
[user@hostname ~]$ onedrive
Authorize this app visiting:
https://.....
Enter the response uri:
Copy the url from browser like this:
https://login.microsoftonline.com/common/oauth2/nativeclient?code=<redacted>
Paste it into terminal then press enter:
The Final result will like this:
[user@hostname ~]$ onedrive
Authorize this app visiting:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=22c49a0d-d21c-4792-aed1-8f163c982546&scope=Files.ReadWrite%20Files.ReadWrite.all%20Sites.ReadWrite.All%20offline_access&response_type=code&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient
Enter the response uri: https://login.microsoftonline.com/common/oauth2/nativeclient?code=<redacted>
Application has been successfully authorized, however no additional command switches were provided.
Please use 'onedrive --help' for further assistance in regards to running this application.
Configuration
Show your configuration:
onedrive --display-config
Test your configuration:
onedrive --synchronize --verbose --dry-run
Performing a sync:
onedrive --synchronize
Download default config:
mkdir -p ~/.config/onedrive
wget https://raw.githubusercontent.com/abraunegg/onedrive/master/config -O ~/.config/onedrive/config
vim ~/.config/onedrive/config
Service
systemctl --user enable onedrive
systemctl --user start onedrive
systemctl --user status onedrive.service