ONEDRIVE(1)
π ONEDRIVE β the onedrive client, bestie edition π
okay so. this is the manual page for onedrive, a User Command, and honestly? it's a whole vibe. it's A client for the Microsoft OneDrive Cloud Service and it's about to be your new fav thing. sit down, grab a snack π, we're doing this.
β¨ NAME β¨
onedrive β A client for the Microsoft OneDrive Cloud Service
π¦ SYNOPSIS π¦
like, the shapes it comes in:
onedrive [OPTION] --sync
onedrive [OPTION] --monitor
onedrive [OPTION] --display-config
onedrive [OPTION] --display-sync-status
onedrive [OPTION] -h | --help
onedrive --version
π DESCRIPTION π
so what IS it β it's a fully featured, free, and actively maintained Microsoft OneDrive client. no cap. it seamlessly supports OneDrive Personal, OneDrive for Business, Microsoft 365 (formerly Office 365), and SharePoint document libraries. like, all of them. the whole friend group π«Ά
it's designed for maximum flexibility and reliability β this powerful and highly configurable client works across all major Linux distributions and FreeBSD. and it can also be deployed in containerised environments using Docker or Podman π³ (iconic). it supports both one-way and two-way synchronisation modes, and it gives you secure and efficient file syncing with Microsoft OneDrive services β tailored to suit both desktop and server environments. literally built different.
π FEATURES π
here's the full list, and yes, every single one is a slay:
- Compatible with OneDrive Personal, OneDrive for Business, and Microsoft SharePoint Libraries
- Provides full support for shared folders and files across both Personal and Business accounts
- Supports single-tenant and multi-tenant Microsoft Entra ID environments
- Supports national cloud deployments including Microsoft Cloud for US Government, Microsoft Cloud Germany, and Azure/Office 365 operated by VNET in China
- Supports bi-directional synchronisation (default) to keep local and remote data fully aligned
- Supports upload-only mode to upload local changes without downloading remote changes
- Supports download-only mode to download remote changes without uploading local changes
- Supports a dry-run mode for safely testing configuration changes without modifying data
- Implements safe conflict handling to minimise data loss by creating local backups when this is determined to be the safest resolution strategy
- Provides comprehensive rules-based client-side filtering with inclusions, exclusions, wildcard matching (
*), and recursive globbing (**) - Allows selective synchronisation of specific files, directories, or patterns
- Caches synchronisation state for efficient processing and improved performance on large or complex sync sets
- Supports near real-time processing of cloud-side changes using native WebSocket support
- Supports webhook-based online change notifications where WebSockets are unsuitable (manual configuration required)
- Monitors local file system changes in real-time using inotify
- Implements the FreeDesktop.org Trash specification, enabling recovery of files deleted locally due to remote deletions
- Protects against accidental data loss following configuration changes
- Supports interruption-tolerant uploads and downloads with automatic transfer resumption
- Validates file transfers to ensure data integrity
- Enhances synchronisation performance through multi-threaded file transfers
- Manages network usage through configurable bandwidth rate limiting
- Supports desktop notifications for synchronisation events, warnings, and errors using libnotify
- Provides desktop file-manager integration by registering the OneDrive folder as a sidebar location with a distinctive icon
- Operates fully in both graphical and headless/server environments, with a graphical environment required only for Intune SSO, desktop notifications, and sidebar integration
π CONFIGURATION π
by default, the OneDrive Client for Linux uses a sensible set of built-in defaults to interact with the Microsoft OneDrive service. yes bestie, it just works out of the box π
the client figures out its configuration from three layers, and they get applied in this priority order:
- Application default values β internal defaults compiled into the client.
- Configuration file values β user-defined settings loaded from a configuration file (if present).
- Command-line arguments β values specified at runtime override both the configuration file and application defaults.
the built-in application defaults are enough for most users and give you a reliable operational baseline. creating a configuration file or using command-line options is optional, and only required when you wish to customise runtime behaviour. lowkey the defaults ate.
NOTE: the OneDrive Client does not create a configuration file automatically. if no configuration file is found, the client runs entirely using its internally defined default values. you only need to create a configuration file if you wish to override those defaults. π
if you do want to adjust the default settings, download a copy of the default configuration template into your local configuration directory. valid configuration file locations are:
~/.config/onedriveβ for per-user configuration./etc/onedriveβ for system-wide configuration.
Example:
to download a copy of the default configuration template, run:
mkdir -p ~/.config/onedrive
wget https://raw.githubusercontent.com/abraunegg/onedrive/v2.5.11/config -O ~/.config/onedrive/config
for a full list of configuration options and command-line switches, refer to the online documentation: https://github.com/abraunegg/onedrive/blob/master/docs/application-config-options.md
π§ CLIENT SIDE FILTERING π§
okay so what even is Client Side Filtering β in the context of the OneDrive Client for Linux, it means user-configured rules that determine what files and directories the client should upload or download from Microsoft OneDrive. these rules are crucial for optimising synchronisation, especially when you're dealing with large numbers of files or specific file types. and the OneDrive Client for Linux offers several configuration options to make it happen:
--skip-diror'skip_dir'config file option β specifies directories that should not be synchronised with OneDrive. useful for omitting large or irrelevant directories from the sync process.--skip-dot-filesor'skip_dotfiles'config file option β excludes dotfiles, usually configuration files or scripts, from the sync. ideal for users who prefer to keep these files local.--skip-fileor'skip_file'config file option β allows specifying specific files to exclude from synchronisation. offers flexibility in selecting essential files for cloud storage.--skip-symlinksor'skip_symlinks'config file option β prevents symlinks, which often point to files outside the OneDrive directory or to irrelevant locations, from being included in the sync.
additionally, the OneDrive Client for Linux allows the implementation of Client Side Filtering rules through a 'sync_list' file π¦. this file explicitly states which directories or files should be included in the synchronisation. by default, any item not listed in the 'sync_list' file is excluded. this approach offers granular control over synchronisation, ensuring that only necessary data is transferred to and from Microsoft OneDrive. so much control. so much power. π
these configurable options and the 'sync_list' file give users the flexibility to tailor the synchronisation process to their specific needs β conserving bandwidth and storage space while ensuring that important files are always backed up and accessible.
NOTE: after changing any Client Side Filtering rule, a full re-synchronisation must be performed using --resync. no skipping this one bestie, fr fr.
πΈ FIRST RUN πΈ
once you've installed the application, you'll need to authorise it using your Microsoft OneDrive account. this can be done by simply running the application without any additional command switches. that's it. main character energy β¨
please be aware that some organisations may require administrator approval before this client can be used. if administrator consent is required, use --display-admin-consent-url to generate the appropriate Microsoft Entra ID administrator consent URL for your tenant.
when run for the first time in a supported graphical environment, the client will attempt to open the Microsoft authorisation URL in your default web browser and listen for the authorisation response on the local loopback callback address http://127.0.0.1:53100/. after you sign in and grant access, authentication should complete automatically and you may close the browser window. easy peasy π
if local browser authentication cannot be used, the client will fall back to the manual authentication flow. in that mode, open the displayed URL in your browser, sign in, grant access, then copy the full redirect URI from the browser address bar and paste it back into the application. yep, you're copy-pasting. you got this π«Ά
this process authenticates the application with your account information, after which the client is ready to sync your data between your local system and Microsoft OneDrive.
π GUI NOTIFICATIONS π
if the client has been compiled with support for notifications, the client will send notifications about client activity via libnotify to the GUI via DBus when the client is being run in --monitor mode. little pings, little updates, we love to see it π
π APPLICATION LOGGING π
when running onedrive, all actions can be logged to a separate log file. this can be enabled by using the --enable-logging flag. by default, log files will be written to /var/log/onedrive. all logfiles will be in the format of %username%.onedrive.log, where %username% represents the user who ran the client.
ok and that's part 1 bestie β there's more coming, don't go anywhere π β¨
β¨ ALL CLI OPTIONS β¨
okay bestie, this is the main event π
these flags are literally the remote control for onedrive. and listen β if you run the client with no options at all, and you're already authenticated, it justβ¦ leaves. exits. does nothing else. no drama, no sync, nothing. so if you want action, you gotta pick a flag. let's go πββοΈ
--sync,-sβ one-time sync with Microsoft OneDrive. that's it, that's the whole vibe β¨--monitor,-mβ watch your filesystem and sync regularly with Microsoft OneDrive. your little guardian angel π«Ά--display-configβ show the config theonedriveclient is currently using. vibe check on your settings π--display-sync-statusβ query the OneDrive service and report back on any pending changes. like checking your notifications π--auth-files ARGβ do authentication without the interactive dialogue, via files that get read/written when you use this option. you pass the two files in as ARG in the formatauthUrl:responseUrl. the authorisation URL gets written to the authUrl file, thenonedrivewaits for the responseUrl file to show up, and reads the response from there.
β οΈ always give the full path when you use this, otherwise the app defaults to the default configuration path for these files (~/.config/onedrive/)
--auth-response ARGβ authenticate without the interactive dialogue by just handing over the response URL directly. no files, just vibes πΈ--check-for-nomountβ checks if.nosyncexists in the syncdir root. if it's there, no sync happens. periodt β--check-for-nosyncβ checks for.nosyncin each directory. if found, that directory gets skipped from sync. bye felicia π--classify-as-big-delete ARGβ how many children in a locally-removed path it takes to get classified as a 'big data delete'. big yikes energy π--cleanup-local-filesβ cleans up extra local files when you're using--download-only. heads up, this removes local data π--confdir ARGβ set the directory where the config files live. your config's home base π--create-directory ARGβ make a directory on OneDrive. no synchronisation happens. just a lil create π--create-share-link ARGβ make a shareable link for a file that already exists on OneDrive. use--with-editing-permsif you want a read-write link instead of read-only. and use--share-password <password>to protect that link with a password. secure queen π--debug-httpsβ debug the OneDrive HTTPS communication. for when the wires are being mysterious π--destination-directory ARGβ destination directory for renamed or moved items on OneDrive. no synchronisation happens.--disable-download-validationβ turn off download validation when downloading from OneDrive. no cap, it just skips the check.--disable-notificationsβ no desktop notifications in monitor mode. silent mode activated π€«--disable-upload-validationβ turn off upload validation when uploading to OneDrive.--display-admin-consent-urlβ shows a tenant-specific Microsoft Entra ID administrator consent URL, for environments where an admin has to approve before users can authenticate and use the client. for the locked-down corporate girlies π’--display-quotaβ show the quota status of the client. no synchronisation happens. how much room do we have left bestie π--download-file ARGβ download a single file from Microsoft OneDrive. give the full online path to the file. no synchronisation happens. just one file, very demure β¨--display-running-configβ show what options the client was configured to use when it started up. receipts! π§Ύ--download-onlyβ mirror the OneDrive online state locally by only downloading changes from OneDrive. local changes do not get uploaded. one-way street π£οΈ--dry-runβ do a trial sync with zero changes made. dress rehearsal π--enable-loggingβ let the client write its activity to a separate log file. diary time π--file-fragment-size ARGβ set the file fragment size for big file uploads (in MB).--forceβ force the deletion of data when a 'big delete' is detected. yes, the dangerous one. yes, it means it. be careful π--force-http-11β force HTTP 1.1 for every operation. old-school but make it fashion π--force-syncβ force a sync of one specific folder, but only when you're using--sync --single-directory, and it ignores all the non-defaultskip_dirandskip_filerules. main character folder energy β¨--get-file-link ARGβ display the file link of a synced file. gimme the URL π--get-sharepoint-drive-id ARGβ query and return the Microsoft 365 Drive ID for a given SharePoint document library.--help,-hβ display application help. when in doubt, ask for help, that's growth π±--list-shared-itemsβ list OneDrive Business Shared Items. see what's been shared with you π--local-firstβ sync from the local directory source first, before downloading changes from OneDrive. local girlies rise π«Ά--log-dir ARGβ directory where the logging output is saved to. has to end with a slash, don't forget it π--logoutβ log out the current user. it's not you, it's the session π--mirror-local-stateβ when used with--local-first, removes remote-only files and directories from Microsoft OneDrive so the online state matches your local filesystem. full mirror behaviour πͺ--modified-by ARGβ display the last-modified-by details of a given path. who touched this last, spill π΅οΈ--monitor-fullscan-frequency ARGβ how many scheduled monitor-interval sync cycles happen before an online full-scan true-up. note: this does not disable the local database consistency check.--monitor-interval ARGβ number of seconds between each sync operation when idle under monitor mode. your heartbeat interval π--monitor-log-frequency ARGβ how often logging happens in monitor mode.--no-remote-deleteβ don't delete local file 'deletes' from OneDrive when you're using--upload-only. nothing leaves π«--print-access-tokenβ print the access token. useful for debugging. don't post it anywhere bestie π--reauthβ reauthenticate the client with OneDrive. fresh start, new you π--remove-directory ARGβ remove a directory on OneDrive. no synchronisation happens.--remove-source-filesβ remove the source file after a successful transfer to OneDrive when using--upload-only. clean up as you go β¨--remove-source-foldersβ remove the local directory structure after a successful file transfer to Microsoft OneDrive when using--upload-only --remove-source-files. full tidy-up π§Ή--resyncβ forget the last saved state, do a whole full sync. the hard reset of your dreams π--resync-authβ approve the use of performing a--resyncaction. consent is key π«Ά--share-password ARGβ require a password to access the shared link when used with--create-share-link <file>. only supported for OneDrive Business and SharePoint environments that allow password-protected sharing.--single-directory ARGβ pick a single local directory inside the OneDrive root to sync. one folder only, no distractions π--skip-dir ARGβ skip any directories matching this pattern from syncing. not today π«--skip-dir-strict-matchβ when matchingskip_dirdirectories, only match explicit matches. no fuzzy business.--skip-dot-filesβ skip dot files and folders from syncing. hidden files stay hidden π--skip-file ARGβ skip any files matching this pattern from syncing.--skip-size ARGβ skip new files bigger than this size (in MB). too big, too much, moving on π--skip-symlinksβ skip syncing of symlinks.--source-directory ARGβ source directory to rename or move on OneDrive. no synchronisation happens.--space-reservation ARGβ how much disk space to reserve (in MB) so you don't hit 100% disk utilisation. future-proofing queen π--sync-root-filesβ sync all files in thesync_dirroot when usingsync_list.--sync-shared-filesβ sync OneDrive Business Shared Files to the local filesystem. shared is caring π«Ά--syncdir ARGβ set the local directory used for synchronisation to OneDrive.--threads ARGβ set the number of worker threads used for parallel upload and download operations. multithreaded and thriving β‘--upload-onlyβ mirror the locally configuredsync_dirstate to OneDrive by only uploading local changes to OneDrive. changes do not get downloaded. the other one-way street π£οΈ--verbose,-v+β print more details, useful for debugging (repeat for extra debugging). say it with me: morev= more tea β--versionβ print the version and exit.--with-editing-permsβ create a read-write shareable link for a file that already exists on OneDrive when used with--create-share-link <file>. edit access, slay π
π DOCUMENTATION
all the docs live on GitHub, go read them bestie:
https://github.com/abraunegg/onedrive/tree/master/docs/
π SEE ALSO
and that's a wrap on the onedrive(1) manual, bestie π this was v2.5.11, dated June 2026 β so you're reading the freshest edition, no cap. go forth and sync responsibly, protect your share links, and please, please respect --force πβ¨π¦
π¦ where this page comes from
- epel 10: onedrive 2.5.11-1.el10_3 Β· GPL-3.0-only
- epel 9: onedrive 2.5.11-1.el9 Β· GPL-3.0-only
- fedora 43: onedrive 2.5.11-1.fc43 Β· GPL-3.0-only
- fedora 44: onedrive 2.5.11-1.fc44 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms