In August 2007, Microsoft developed a cloud storage service named OneDrive. This application permits you to save the files or folders in the cloud and access them whenever required. It offers 5GBs of free space using which you can sync photos, documents, movies, or any other files. You can also increase the specified storage with paid plan subscription.
This write-up will provide the procedure related to the installation, usage, and uninstallation of OneDrive on Ubuntu 22.04. Let’s get started!
If you have installed OneDrive using any PPA repository, then it is recommended to remove it first, as it only gets updated when Debian packages are updated.
For this purpose, firstly, uninstall OneDrive from your system:
$ sudo apt remove onedrive
Then, remove the added PPA repository utilizing the following command:
$ sudo add-apt-repository --remove ppa:yann1ck/onedrive
Next, kill all of the processes or applications running in the background and update the system packages:
$ sudo rm -rf /var/lib/dpkg/lock-frontend $ sudo rm -rf /var/lib/dpkg/lock $ sudo apt update
Upgrade your Ubuntu 22.04 system:
$ sudo apt upgrade -y
$ sudo apt dist-upgrade -y
Remove unwanted dependencies:
$ sudo apt autoremove -y
Lastly, remove the packages files that can no longer be downloaded:
$ sudo apt autoclean -y
Now, let’s move toward OneDrive installation on Ubuntu 22.04.
How to Install OneDrive on Ubuntu 22.04?
Utilize the offered instructions for the installation of OneDrive on Ubuntu 22.04.
Step 1: Update System Packages
Open up your Ubuntu 22.04 terminal by pressing “CTRL+ALT+T” and write out the provided command for updating the system packages:
$ sudo apt update
As you can see, all packages are up to date:
Step 2: Add Release Key of OpenSuSE Build Service Repository
In the next step, add the release key of the OpenSuSE release key to your system:
$ wget -qO - https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_22.04/Release.key | gpg --dearmor | sudo tee /usr/share/keyrings/obs-onedrive.gpg > /dev/null
Step 3: Add OpenSuSE Build Service Repository
After adding the release key of the OpenSuSE build release key, add its repository with the help of the following command:
$ 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_22.04/ ./" | sudo tee /etc/apt/sources.list.d/onedrive.list
Step 4: Update System Packages
Again, update the system packages:
$ sudo apt update
Step 5: Install OneDrive on Ubuntu 22.04
Now, install OneDrive on your Ubuntu 22.04 system:
$ sudo apt install onedrive -y
The given error-free output states that we have successfully installed OneDrive:
Let’s head toward launching OneDrive on the Ubuntu 22.04 system.
How to Launch OneDrive on Ubuntu 22.04?
In order to launch OneDrive, type “onedrive” on the terminal and hit “Enter”:
Copy the given link in the output and paste it into your favorite browser for authorizing the OneDrive application by utilizing your account:
Permit the OneDrive client the required access and click on the “Yes” button:
After doing so, you will be navigated toward the following blank page. Copy the URI from the address bar:
Then, paste the copied URI in front of the “Enter the response uri” section and press “Enter”:
Upon doing so, you will see a message signifying that the OneDrive application is successfully authorized:
Now, synchronize your cloud OneDrive file to the local Ubuntu 22.04 system by specifying the “–synchronize” option in the “onedrive” command:
$ onedrive --synchronize
Want to use OneDrive with the help of a GUI tool? Check out the following section.
How to Use OneDrive on Ubuntu 22.04?
“insync” is a client utility that can be used to manage your oneDrive, Google Drive, and Dropbox files on Ubuntu 22.04 desktop. It can sync any files and folders from the local storage in a few seconds.
To sync files on OneDrive using insync, follow the below-given procedure.
Step 1: Install insync
Firstly, visit the official website of the insync, click on the “For desktop” button, and select the “Download for Linux” option:
Step 2: Select Distribution and Version
From the highlighted drop-down menu, select “Ubuntu” as your distribution and “22.04” as its release version:
Within a few minutes, insync “.deb” file will start downloading:
Step 3: Move to Downloads folder
Move to “Downloads” directory where the insync “.deb” file is placed:
$ cd Downloads/
Step 4: Install insync
Run the following command to install insync on your system using the provided command:
$ sudo apt install ./insync*.deb
Note: This command is generic and can be utilized for installing any version of insync.
You can also utilize the Ubuntu 22.04 GUI for the specified purpose. To do so, move to the “Downloads” directory, right-click on the insync “.deb” file, and select the “Open With Other Application” option:
Choose the “Software Install” option and click on the “Select” button:
Then, click on the “Install” button:
You will be then asked to enter the system password for the authentication:
As you can see, we have successfully installed insync on our system:
Step 5: Launch insync
Search for “insync” in the “Applications” menu of Ubuntu 22.04 and launch it:
Click on the “Start Insync” button to start using the insync application:
Step 6: Connect insync with OneDrive
Hit the “Add OneDrive” option to sign into OneDrive via browser:
Enter your “Email Address” linked with Microsoft account and click on the “Next” button:
Authorize required permissions to insync and click on the “Yes” button:
As a result, the insync homepage will open up on the browser with the message that you should be now logged in:
Step 7: Setup Account
Click on the “Next” button to setup your account on insync:
Then, select the base folder or the local default sync folder and hit “Next”:
Configure your sync preferences and click “Next”:
Step 8: Sync Files on OneDrive
Choose the items you want to 2-way sync from files and click on the “Sync” button. For instance, we have selected “Document 2.docx” and “Document 3.docx”:
The green verification mark with the highlighted files indicates that we have successfully synced our files to OneDrive:
How to Uninstall OneDrive From Ubuntu 22.04?
In order to uninstall OneDrive, firstly, remove insync from Ubuntu 22.04 by writing out the provided command on the terminal:
$ sudo apt remove insync -y
You can also utilize the Software Center for removing insync by clicking on the highlighted button:
Hit the “Uninstall” button for the confirmation purpose:
Hit the “Uninstall” button for the confirmation purpose:
Enter your system password and click on the “Authenticate” button:
Within a few seconds, the insync application will get removed. Lastly, utilize the given command for uninstalling OneDrive from Ubuntu 22.04:
$ sudo apt remove onedrive -y
The given output indicates that OneDrive is now successfully uninstalled:
We have offered the procedure related to installation, usage, and uninstallation of OneDrive on the Ubuntu 22.04 system.
To install OneDrive on Ubuntu 22.04, firstly fulfill the given pre-requisites. Then, update system packages, add the release key of the OpenSuSE build repository, and add the related repository to the system. After doing so, run the “$ sudo apt install onedrive -y” command for OneDrive installation. Next, install insync with the “$ sudo apt install ./insync*.deb” command and sync files on OneDrive using this utility. This write-up provided the procedure to install, use, and uninstall OneDrive on Ubuntu 22.04.
The Best Linux Tutorials Website