How to sync Microsoft OneDrive with Linux
Open source enthusiasts love to have a cloud-based storage device. Companies like Google, Amazon, Dropbox and Microsoft offer reliable products for free. This means that these companies will scan or read user files to comply with legal requirements or to serve ads. That is the reality of life, but this does not mean that users should not use these cloud storage services.
OneDrive is Microsoft's cloud-based storage service. Although it fits perfectly with the Windows platform, OneDrive will also connect to machines running on the Linux platform very easily. There are several ways to do this. Let's learn how to synchronize Microsoft OneDrive with Linux through the following article!
Instructions for syncing Microsoft OneDrive with Linux
- Install Onedrive
- For Ubuntu
- For Fedora
- For Arch Linux
- Setting
- Configuration
- Selective synchronization
- Start Onedrive when logging in
Install Onedrive
Onedrive is a CLI-based client, allowing users to sync quickly and easily with OneDrive.
To install Onedrive, first install some dependencies and set up git. Go to Terminal and enter one of the following commands.
For Ubuntu
sudo apt install libcurl4-openssl-dev git sudo apt install libsqlite3-dev
If you are using Ubuntu 18.04 and above, use snap to install dmd:
sudo snap install --classic dmd && sudo snap install --classic dub
If not, use the following command:
sudo wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list sudo apt-get update && sudo apt-get -y --allow-unauthenticated install --reinstall d-apt-keyring sudo apt-get update && sudo apt-get install dmd-compiler dub
For Fedora
sudo yum install libcurl-devel git sudo yum install sqlite-devel curl -fsS https://dlang.org/install.sh | bash -s dmd
For Arch Linux
sudo pacman -S curl sqlite dlang git
Setting
After installing dependencies, fetch files with git:
git clone https://github.com/skilion/onedrive.git
Compile and install it:
cd onedrive make sudo make install
After doing this, users now need to authorize Onedrive with Microsoft so that it can access the account. Just enter the following information in Terminal:
onedrive
And the user will be prompted to access the URL to receive authorization.
Log in to your OneDrive account and authorize the application to access your account.
Once this is done, an empty white page will appear. Copy the URL and paste it into Terminal at the command prompt.
Onedrive will start downloading all files in the cloud to the local directory.
Configuration
Users can find the 'config' file in the 'onedrive git' folder . To enable it, move it to the '~ / .config / onedrive /' directory.
mkdir -p ~/.config/onedrive cp ~/onedrive/config ~/ .config/onedrive/config
Open the file 'config'. There are two configuration options: 'sync_dir' and 'skip_files'.
- sync_dir: The location for storing OneDrive files. All files placed in or deleted from this folder will be synchronized with the cloud.
- skip_files: File type (or file template) is not synchronized.
After making the changes, save and restart Onedrive.
Selective synchronization
If you prefer to use the selective sync feature rather than synchronizing the entire OneDrive folder, users can create a file named 'sync_list' and place it in the '~ / .config / onedrive' folder. Inside the file add the relative path (from the synchronized OneDrive folder) to the files or folders you want to sync.
Start Onedrive when logging in
By default, Onedrive does not start when users log on. To make it automatically run when logged in, users can use systemd:
sudo systemctl --user enable onedrive sudo systemctl --user start onedrive
Or just add Onedrive to the startup application.
Now OneDrive will sync with the Linux system.
Hope you are succesful.
You should read it
- 8 super useful things you can do with Microsoft OneDrive on Android
- Create referral links in OneDrive to increase storage space
- Microsoft is starting to push the rollout of a 64-bit version of OneDrive to Windows 10 users
- How to reinstall Microsoft OneDrive on Windows 10
- How to transfer archived data from OneDrive to another drive
- How to double OneDrive's free storage
- Instructions for using OneDrive on iOS devices
- Microsoft closes the time to declare from the OneDrive desktop app on Windows 7, 8 and 8.1
May be interested
- Microsoft is starting to push the rollout of a 64-bit version of OneDrive to Windows 10 usersonedrive is built into windows, and microsoft has confirmed that it will silently update the program to 64-bit if the user's pc meets the requirements.
- How to reinstall Microsoft OneDrive on Windows 10in the past few years, when the demand for cloud storage for individuals and businesses is increasing, microsoft onedrive has emerged as a particularly useful and extremely stable service.
- How to share photos from the OS X Photo application to OneDriveapple's photo apps application is integrated to act as a bridge between mac os x and icloud. if you are using apple devices, you can easily sync files and images between mac and iphone or ipad.
- Microsoft closes the time to declare from the OneDrive desktop app on Windows 7, 8 and 8.1microsoft has just made an official announcement about the path to end support for the onedrive desktop application on windows 7, 8 and 8.1 operating systems platforms. as follows:
- How to double OneDrive's free storageearlier this year, microsoft renamed skydrive service to onedrive, and improved services on a monthly basis. with constantly updated applications, free hosting for services and a host of other added features, microsoft is pushing onedrive.
- Fix the error that OneDrive files or folders could not be deletedonedrive is quite popular among windows 10 users due to its ability to connect multiple devices and keep files in sync between them. however, sometimes it will crash and prevent you from deleting files or folders.
- Microsoft introduces a series of new photo editing features for OneDrive on the webfor nearly a year, microsoft has been quite active in improving onedrive by adding new features to help users do their work faster and more efficiently.
- Tips to help you use the OneDrive online storage service bettermicrosoft onedrive is one of the excellent cloud storage services. it increasingly tightens security, flexibility in features and is available on most major platforms.
- New features in the OneDrive for iOS appmicrosoft's mobile online storage service for ios has been added new features such as offline scanning, document scanning and expired links. some of these features have been found in scanning applications like microsoft's office lens earlier. however, now, you can access them easily from the onedrive app.
- Instructions for using OneDrive on iOS devicesmicrosoft onedrive is a cloud storage service similar to dropbox. after registering an account, you will receive 15gb of free storage. with onedrive, you can store multimedia files, documents, etc., so you can easily manage and share files on many different platforms.