How to Upload to Onedrive via Bash

OneDrive is a cloud-based storage service that is developed by Microsoft. It allows you to store files in a deject deeply and access them from anywhere in the world. The OneDrive service is available for free to everyone who has a Microsoft business relationship.

For Linux users, there is no official desktop client for the Microsoft OneDrive. Hence we suggest an culling 3rd-political party software called Rclone. This app is a command-line based tool used to synchronize all your files to and from the cloud.  Rclone tool supports various deject storage services like Amazon Bulldoze, Google Drive, and many other cloud storage services, including the Microsoft OneDrive.

One of the great features of Rclone is that information technology can mount whatsoever of the supported cloud storage services as a file system. But its highly recommended to be careful while using this feature every bit is withal in the experimental phase.

In this guide, we will walk you through the installation of Rclone on Ubuntu. Also, we will evidence you detailed steps on how to mount Microsoft OneDrive as a file system.

Installing Rclone on Ubuntu

Earlier starting, you need to make certain that your system is updated using the next commands:

sudo apt update sudo apt upgrade

At present, yous can download the Rclone binaries from the official Rclone website. Or you install Rclone using the roll command, but get-go, we demand to install curl package on your system.

sudo apt install ringlet
Install Curl Package
Install Curl Bundle

And so install the Rclone using the following command:

scroll https://rclone.org/install.sh | sudo fustigate
Use Curl To Install Rclone Package
Use Curl To Install Rclone Package

After the Rclone tool is installed successfully, you should come across a confirmation message in the Terminal.

Rclone Package Installed Successfully
Rclone Packet Installed Successfully

Add Microsoft OneDrive Remote To Rclone

As you lot can notice in the output, it suggests running the "rclone config" control to start calculation new remote services.

Step 1. Run the Rclone configuration command that will list multiple options.

rclone config
Start Rclone Configuration
First Rclone Configuration

Pace two. To add a new remote service, enter "n" and so press the Enter key.

Choose The New Remote Option
Choose The New Remote Option

Pace 3. You volition exist required to enter a new name for the new remote service. Only input the name you need then press the Enter key. (In my case, I take used the "microsoftonedrive" every bit a proper name for the new Microsoft OneDrive service that we are going to create.)

Give It A Name
Give It A Name

Pace iv. Later on pressing the Enter key, you will see a list of all supported cloud storage services. Now you lot need to roll to search for the Microsoft OneDrive service and become the corresponding number.

List Of Supported Cloud Storage
List Of Supported Deject Storage

Step five. As you can see, the corresponding number for the Microsoft OneDrive is 22.

Search For Microsoft OneDrive Number
Search For Microsoft OneDrive Number

Next, enter the 22 number and press the Enter key.

Enter The Microsoft One Drive Number
Enter The Microsoft One Bulldoze Number

Step six. Here you lot will exist required to enter the client_id. There is no need to enter it. Merely go out it blank and press the Enter key.

Just Press Enter For The Client_ID
Simply Press Enter For The Client_ID

Step 7. Besides, you volition be asked to enter the client_secret, leave information technology blank, and press the Enter key.

Just Press Enter For The Client_Secret
But Press Enter For The Client_Secret

Step 8. In instance y'all demand to edit the advanced configurations, press "y" otherwise cull n" then press the Enter central.

Edit Advanced Configuration
Edit Advanced Configuration

Pace 9. In this step, y'all volition be asked to enter the auto-configuration. It's recommended accepting this and press "y" then the Enter key.

Auto Configuration
Machine Configuration

Step 10. Yous will get a message like the below ane, indicating that your default browser will open automatically.

Your Default Web Browser Should open automatically
Your Default Web Browser Should open automatically

Stride 11. A new tab in your default browser volition be opened, and you volition be asked to enter your Microsoft business relationship details.

Enter Your Microsoft One Drive Email
Enter Your Microsoft One Bulldoze Email

Step 12. Now y'all will be asked to allow the Rclone to admission your Microsoft OneDrive account. Press the Enter primal to enable access.

Allow Access To Rclone
Allow Admission To Rclone

Step 13. If everything went successfully, you would get a message like the below one.

Rclone Allowed Successfully
Rclone Immune Successfully

Step 14. Now return to the opened concluding and choose your account blazon. In our case, we will select the showtime selection, which is the personal account, and printing the Enter key.

Choose Your Microsoft One Drive Account Type
Choose Your Microsoft One Drive Business relationship Type

Step xv. You will go an account listed, utilize the corresponding number, and press the Enter key.

Select Drive To Use
Select Drive To Use

Step 16. A confirmation message volition be displayed, press "y" then the Enter key.

Confirm The Selected Drive
Confirm The Selected Bulldoze

Step 17. Check the given settings, if it is okay so press y and then the Enter key.

Confirm Microsoft One Drive Token
Ostend Microsoft One Drive Token

Stride 18. Finally, the Microsoft OneDrive remote service is added successfully. Now you lot tin exit this screen by pressing "q" then the Enter key.

Microsoft One Drive Added Successfully
Microsoft Ane Bulldoze Added Successfully

Mount Microsoft OneDrive Using Rclone

In this part of our tutorial, we are going to mountain the Microsoft OneDrive.

Stride 1. Let's create a new directory in your home directory.

mkdir microsoftonedrive
Create A New Directory
Create A New Directory

Step 2. To mount the Microsoft OneDrive, use the next Rclone command.

rclone --vfs-cache-mode writes mount microsoftonedrive: /abode/hendadel/microsoftonedrive
Mount Microsoft One Drive
Mount Microsoft Ane Bulldoze

Footstep 3. To stop the mounted Microsoft OneDrive, printing the "Ctrl+C" to exit the Rclone service.

Mount Microsoft OneDrive On System Startup

Here we are going to mount the Microsoft OneDrive on system startup.

Step ane. From your installed applications, search for the Startup Applications programme and open information technology.

Open Startup Applications
Open Startup Applications

Step 2. Now press the Add button to add a new program to the list.

Add New Application To Startup
Add New Application To Startup

Step iii. Enter a name for your startup program, and side by side apply the next command in the control field. After submitting all the details, press the Add button.

sh -c "rclone --vfs-cache-manner writes mountain microsoftonedrive: /home/hendadel/microsoftonedrive"
Enter The Details For Microsoft One Drive
Enter The Details For Microsoft I Drive

Step 4. Every bit you can see, Microsoft OneDrive is added to your startup programs.

Mount Microsoft One Drive On System Startup
Mount Microsoft I Drive On Arrangement Startup

Congratulations, you have just mounted the Microsoft OneDrive using the Rclone. That's information technology for at present.

sessionsgreamen.blogspot.com

Source: https://www.fosslinux.com/24391/how-to-sync-microsoft-onedrive-from-command-line-in-linux.htm

0 Response to "How to Upload to Onedrive via Bash"

Enviar um comentário

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel