Categories
Device

How to use google drive on linux

Last updated September 27, 2019 By Munif Tanjim 53 Comments

How to use google drive on linux

Brief: While Google Drive is not officially available for Linux, here are tools to help you use Google Drive in Linux .

Google Drive is an integral part of the Google ecosystem. It offers 15 GB of free storage which is shared across your Gmail account, Google Photos, various Google and Android services. Since its debut in 2012, we’ve seen official Google Drive clients for Windows, OS X, Android, iOS.

But, unfortunately, an official Linux client is yet to see the light of the day, if ever. This deliberate and continual ignore by Google has prompted Linux users to question if Google hates desktop Linux?

However, in the world of Linux, there’s always an alternative or workaround. Here we’re going to see such alternatives ways you can use Google Drive in Linux .

Best tools to use Google Drive in Linux

The list here is no particular order. I have just listed a few Google Drive desktop clients for Linux along with some other hacks.

1. Insync

How to use google drive on linux

Insync is the most feature-rich Google Drive desktop client available out there. You’ll find almost everything you want from a Google Drive client in it, including multiple account support, desktop notification, symlink support etc.

It’s available for all major Linux distros and the installation process straightforward. It offers a beautiful GUI as well as the command-line interface.

The only downside is that Insync is not free. Insync provides a 15 day free trial period. After that, it’ll cost you about $29 one-time payment for a single account and for multiple accounts, Insync has per-year pricing plans. If you have no problem with that, we can safely say that Insync is the Google Drive desktop client you’re looking for.

2. overGrive

overGrive is yet another feature-rich Google Drive desktop client. It includes almost all the features from Insync with some exceptions, such as no symlink support. It provides a nice GUI and an interactive setup process. overGrive supports all major Linux distros and desktop environments. It’s also available in multiple languages.

Though overGrive is not free, its price is far less than that of Insync. The license fee for overGrive is only $4.99. It can be a good choice for Google Drive desktop client.

3. Rclone

Rclone is actually more than just a Google Drive client. It is a command-line program to sync files and directories to and from various cloud storage services, including Google Drive, Dropbox, Amazon S3, OneDrive etc. The installation and usage documentation can be found on their official website. For configuring Google Drive with Rclone, read this.

It’s completely free and open source. You can find the source code in the GitHub repository of Rclone. If you are comfortable working with the command-line interface, you can pick this one.

4. Drive

This one’s a little bit interesting. Drive was originally developed by Burcu Dogan, while working on Google Drive platform’s team. So, this is the closest thing we have to an official client.

It’s a command-line tool written with GO programming language. It doesn’t have background sync feature. It’s designed to upload/download files in a push/pull style. Frankly, it’s a little difficult to use it for everyday purposes. You’ll find a complete guide for Drive on its GitHub project.

Platform specific installation methods can be found here.

5. GNOME (version 3.18+)

If you use GNOME as your desktop environment, you’re in luck. Starting from version 3.18, GNOME has baked in a Google Drive feature in their file manager Nautilus.

If you add your Google Account in GNOME Online Accounts, Nautilus will automatically have Google Drive added to its sidebar as a remote filesystem. It’s not actually a desktop client. But you can do some cool things like drag&drop file uploading, opening Google Drive files directly from Nautilus, copying files from Google Drive to your local filesystem etc.

Your pick?

It’s totally disappointing that Google hasn’t yet come forward with an official Google Drive client for Linux despite the growing popularity of Linux. Until it does, these alternatives are all we have.

Which one of these is your favorite? Do you have any other suggestions to use Google Drive in Ubuntu or any other Linux? Are you facing trouble using any of these methods? Whatever the reason is, you’re always welcomed to use our comment section.

Like what you read? Please share it with others.

Unlike Windows on Ubuntu’s latest versions such as 20.04 LTS, we don’t need to install any extra software to connect and use Google Drive account. Everything there and we just need to login to Ubuntu using a Google account.

One of the popular public cloud services to store data is Google Drives because of free 15 GB storage. Most of the time to use that we visit Google Drive’s website to upload and download files, however, you can save your time by access G – Drive storage directly on your machine like any other network drive. However, there is no official client from Google for Linux systems, well, still we can use it using the default GNOME Online Accounts feature available on Ubuntu and other Linux systems.

1. Open Settings

Go to Ubuntu Settings, you can search for it in Applications or directly click on the drop arrow given right top side top access the Power Menu.

2. Select Account

On the left side panel, you will find various options and one of them will be Accounts, select it to see further options.

3. log in to Google Account

As Gnome Online Accounts offers various services to directly logged in from Ubuntu Linux, among them you will also find Google.

Note: If you couldn’t see Google online Account option then install it using the below-given commands in the terminal:

Click on it and enter your Gmail email address and password.

How to use google drive on linux

Click Allow to let Gnome online Account service to access your Google Account

How to use google drive on linux

Once the account gets connected, we can select what should get synced on the Ubuntu system.

How to use google drive on linux

4. Access Google Drive on Ubuntu 20.04

Finally, open File Manager on your Ubuntu Linux system, and on the left side area, you will see the connected Google Drive account represented using your Gmail Email ID. Click on it, to access all files available on your drive.

How to use google drive on linux

We can directly copy-past to sync or backup all the available files between the Ubuntu 20.04 Linux system and Google Drive.

How to use google drive on linux

So, in this way, you can access our Google cloud storage files on Ubuntu Linux without using any official client…

Anyone with a Google account has a free 15 GB of cloud storage in Google Drive. Of course, additional storage is also available for the price of a subscription. The problem for Linux users is that Google has not made an official Google Drive client for Linux.

Other operating systems have an easy time syncing files with Google Drive, either as a backup or just for storage, thanks to Google supplying them with a client application. Linux users are not completely without options, though. In this guide, we’re going to cover two different methods for using Google Drive on a Linux system.

In this tutorial you will learn:

  • How to use Google Drive with GNOME
  • How to use Google Drive with KDE

How to use google drive on linux

Software Requirements and Linux Command Line Conventions

Category Requirements, Conventions or Software Version Used
System Most Linux distros with GNOME, KDE, Xfce, or MATE
Software GNOME Files/Nautilus, GNOME Online Accounts, KDE Dolphin
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command $ – requires given linux commands to be executed as a regular non-privileged user

Access Google Drive From GNOME Files (Nautilus)

GNOME is a really popular desktop environment included on many distributions by default, like Ubuntu. Fortunately for GNOME users, the file manager has the ability to connect with your Google account and access the files in Drive.

If your system is running KDE, check the next section below for another method of using Google Drive on Linux. If your system is running neither GNOME nor KDE, you can still use the GNOME method shown in this section (verified to work with MATE and Xfce desktop environments).

Most likely, this GNOME component should already be installed on your system (if you are indeed running GNOME). But just in case it’s not, you can open a terminal and use one of the following commands to install it.

On Debian based distros, including Ubuntu:

On Red Hat based distros, including Fedora and CentOS:

On Arch Linux based distros, including Manjaro:

Once it’s installed, use the step by step instructions below to setup your Google account with the GNOME Online Accounts utility.

    First, open the GNOME settings menu for online accounts by either typing the command below or finding it in your applications launcher.

How to use google drive on linux

Click on Google and then use your account credentials to sign in. You will have to grant GNOME permission to access your Google Drive files as well as other data, so click ‘Allow’ when that prompt shows up.

How to use google drive on linux

Make sure you allow GNOME to access the files. The rest is optional and you can toggle those settings as needed.

How to use google drive on linux

Once your account has been added, you’ll see it on the left side of the GNOME Files utility (or Caja, Thunar, etc).

How to use google drive on linux

You can left click on your account to have Google Drive automatically mounted and accessible.

How to use google drive on linux

That’s all there is to it. You can drag and drop files and folders in or out of this area to have the changes be synchronized with Google Drive. You may also edit files directly, and the changes will instantly be sent to Drive when you save the file.

Access Google Drive From KDE

KDE is another popular desktop environment from which Google Drive can be accessed. If your system uses KDE, follow the step by step instructions below to integrate the Dolphin file browser with your Google Drive.

Before beginning, you’ll need the kio-gdrive package installed on your system. Open a terminal and use one of the following commands to install it.

On Debian based distros, including Ubuntu:

On Red Hat based distros, including Fedora and CentOS:

On Arch Linux based distros, including Manjaro:

On openSUSE based distros:

    Open the Dolphin file manager and click on ‘Network’ on the left side.

How to use google drive on linux

Next, open the Google Drive folder.

How to use google drive on linux

Use your Google credentials to sign in and give KDE permission to access your Google Drive.

How to use google drive on linux

You can now access your Google Drive files any time from Dolpin. Drag and drop files to this area in order to sync with Drive, or just edit the files directly in the cloud.

How to use google drive on linux

Closing Thoughts

In this guide, we saw how to use Google Drive on a Linux system. GNOME and KDE provide support for integrating Google Drive directly with their file managers. And the GNOME online account utility can also be used across other desktop environments. This is as good of a solution as Linux users are going to get, unless Google decides to release an official client.

Google Drive is a very popular cloud-based drive and storage service. Google Drive can be used in different ways from Web, Android, iPhone, Windows, macOS, and Linux. But as today Google does not provide native Google Drive client for Linux distributions like Ubuntu, Debian, Centos, Mint, etc. Even Google advises Web Browser in order to work with Google Drive for Linux users there are some 3rd party applications, tools to connect Google Drive to the local Linux system.

There are a lot of different Google Drive clients for Linux operating systems but most of them are incomplete or unpractical or error-prone to use. In this tutorial, we will use the following 2 Google Drive clients that are superior to other alternatives.

  • GNOME Online Accounts
  • Google Drive Ocamlfuse

GNOME Online Accounts is a Gnome project which is created in order to use some popular online services natively with a GNOME desktop. Google Drive is one of the supported online services by Gnome Online Accounts. Gnome Online Accounts is the most stable way to use Google Drive in a Linux operating system because of its Gnome community and support.

In order to use GNOME Online Accounts first, we will install it with the following command. We can install and use the GNOME Online Accounts even we do not use the GNOME desktop environment as all dependencies will be installed automatically. So this means we can use Gnome Online Accounts with other desktop environments like KDE, XFCE, LXDE, etc.

After the installation is complete we can access the Gnome Online Accounts from the menu or dash with the GNOME Control Center like below.

How to use google drive on linuxGnome Control Center

From the Gnome Control Center, we will click to the Online Accounts section and the supported online services will be listed in the main screen. We will select the Google because it is a Google service.

How to use google drive on linuxGnome Online Accounts Google Drive

In the following step we need to authenticate to the Google Drive accounts we want to use and sync. We will be asked for the Google Account or user name with the following screen. We will put the Google user name which is poftut in this case. We will also be informed that this account will be integrated with the GNOME application.

In the following step, we will provide the password of the previously provided account. We will also display the password in clear text by clicking the eye icon in order to make sure password correctness.

In the following step, we will allow the Gnome to access our provided Google account and related Google services. As we can see that the account will be completely controlled with this GNOME application. We will click to Allow button.

In this step, we will allow our provided Google Account to be used with the following services. As we want to access Google Drive we will enable Documents in this case. An alternative we can enable or disable other services. For security reasons please disable the Google services you will not use.

Now we have integrated Google Drive and use it with a native file browser like Gnome Files, Nautilus, etc. The added Google Drive account will be listed in the left location pane with the account email address as below. We can navigate Google drive files like local files and folders.

google-drive-ocamlfuse is a FUSE filesystem for Google Drive, written in OCaml. It lets you mount your Google Drive on Linux distributions. As a script or filesystem library it is managed via command line but can be used with GUI like File Browsers. It provides the following features.

  • Full read/write access to ordinary files and folders
  • Read-only access to Google Docs, Sheets, and Slides (exported to configurable formats)
  • Multiple account support
  • Duplicate file handling
  • Access to trash ( .Trash directory)
  • Unix permissions and ownership
  • Symbolic links
  • Read-ahead buffers when streaming
  • Accessing content shared with you (requires configuration)
  • Team Drive Support
  • Service Account Support
  • OAuth2 for Devices Support

Let’s start the installation. As a non-standard script, we need to add some extra repository to our Linux system. Ocamlfuse packages are created for the Ubuntu distribution so in order to use other Linux distributions the source code installation should be executed which is explained here.

Now we will install the OcamlFuse with the following command. The package name is google-drive-ocamlfuse .

Now as stated previously we will complete the Google Drive integration from the command line. First, we will create a directory where Google Drive will be mounted. In this case, we will name the directory as googledrive .

Now we will run the google-drive-ocamlfuse command like below.

This command will open the web browser in order to authenticate the Google Drive user with username and password. We will provide the username poftut like below.

We will provide the user password with the following screen.

In the following screen, we will see that gdfuse which is the google-drive-ocamlfuse name wants to access the Google Drive files. We will simply click to Allow .

We can also see the following screen where we need to allow the account to the Google Account.

If everything is complete successfully we the web browser will be redirected to a success page which is like below and provided by gdfuse.

Now as the last step we will mount our Google Drive to the directory we have previously created named googledrive like below.

If there is no error message everything is ok. We can list the Google Drive files from the command line or a standard file manager like below.

As an extra check, we can list already mounted file systems with the df command where Google Drive will also list. We can also get information like available size, used size, total size, and percentage information.

Google drive is a great FREE cloud storage service. It allows you to store your data in the cloud so you can access it anywhere in the world, from just about any device. In this Linux Quick Tip we will show you how to easily mount your Google Drive using Gnome Online Accounts. Once mounted, you can access, copy, and delete your files from the GUI or the command line.

Set Up Google Drive in Gnome Online Accounts

Let’s fire up Gnome Online Accounts and add our account. Go to Settings > Online Accounts to access the Add an account screen pictured below.

How to use google drive on linux

Click on Google and you will be asked to provide your gmail user account credentials. pass two factor authentication if enabled, and grant Gnome access to your account.

How to use google drive on linux

Once you are authenticated, you will be asked what features you want access to. You can select whatever you want here. Some of my friends like to enable everything so they can use the Gnome native apps. Since this article is about mounting Google Drive in Linux, we only need to ensure Files is turned on. Make sure the switch next to Files is on, and click the x to close the dialog box.

How to use google drive on linux

Now you will see that your Google account is connected. Once you are at this point, you are ready to start using Google Drive.

Access Google Drive From Linux GUI

Now that your account is active, you can start using Google Drive. If you open “Files” you will see a new drive on the left menu with your gmail address as it’s name. This is your Google Drive and you can copy, delete, and rename files from it just like you would any other folder.

How to use google drive on linux

Now that you can access Google Drive from your desktop, so can all of your apps. You can use your favorite backup tool (Deja Dup?) to copy your important files to Google Drive.

Access Google Drive from Linux Command Line

Here is where this became really useful for me. I wanted to access Google Drive from the command line so I can use rsync to synchronize my Documents directory with Google Drive.

Gnome uses it’s gvfs (GNOME Virtual file system) to mount Google Drive with your account. The default location for a gvfs mounted drive is /run/user/ /gvfs/ / . Of course you have to replace with your UID and with the Google Drive connection name.

You can your UID by using the echo command like so:

Or you can use the following command to add it on the fly:

Here is it in action:

As you can see above, Google Drive doesn’t show the “display-name” of the file, but rather the ID of the file. This can make it hard to know what file you are going to be accessing. You can get a list with the filenames by using the gio command.

Because I use this so often, I created an alias to quickly get a listing. I added the following to my

Now I can just lg when I want a listing with the common names.

Now that I have this setup, I use rsync to synchronize my Documents folder with Google Drive. Now no matter where I am I can log into my gmail account and have access to all my documents. If you are interested in how this works leave a comment below!

Conclusion

There you have it, a simple method for connecting and mounting your Google drive on your Linux system. I use this every day and love it.

For what I know there isn’t an official google drive application for Linux and so after looking around I’ve found that there are some interesting project that you can use to access your data on Google Drive from your linux, and in particular today I’d like to show 2 of them:

Grive and Grive Tools: These 2 tools are good if you want to use Google Drive on your laptot or Desktop or in general in a graphical environment.

google-drive-ocamlfuse: This is more suited if you want to mount your Google Drive from a server or from a terminal, in fact this software will mount your Google Drive as File System and you’ll be able to move inside it and see all your files, like a local file system.

Grive Tools

Grive it’s a project of 2012 it simply downloads all the files in your
Google Drive into the current directory. After you make some changes to the local files, run grive again and it will upload your changes back to your Google Drive.

New files created locally or in Google Drive will be uploaded or downloaded respectively. Deleted files will also be “removed”. Currently Grive will NOT destroy any of your files: it will only move the files to a directory named .trash or put them in the Google Drive trash in this way you can always recover them.

What was missing from Grive was an easy setup, install and desktop integration on the desktop in general, and so a graphical interface has been created by http://www.thefanclub.co.za Grive Tools

Grive Tools consists of the following components:

Grive Setup – The main setup installation program to get started.
Grive Indicator – Application indicator for Google Drive.

Requirements:

  • Grive Tools is available for Ubuntu 12.10, 13.04, 13.10, 14.04. Debian and Mint should also work with minor changes to the instructions.
  • Ubuntu 12.04 is NOT officially supported because of dependency issues but see here for Ubuntu 12.04 64bit installation instructions. We use Grive Tools daily on Ubuntu 12.04 64bit without issues but do not ask for support if you encounter install problems.
  • Supported Desktops include Unity, Gnome, KDE, Xfce, Cinnamon and LXDE
  • Fedora , openSUSE and Red Hat / CentOS users see Fedora Google Drive Client with Grive and Grive Tools
  • On Ubuntu and Mint add the PPA Grive Tools alle vostre sorgenti software e installare Grive Tools. You can do this from the terminal with the following commands:

This installed around 50 packages on my Linux mint 16 (xfce edition), after the installation you can run the setup wizard that can be found under Menu -> accessories -> grive setup

How to use google drive on linux

On this screen click next, this will open your default browser on an authorization screen of Google, where you can grant to grive application the permission to work with gdrive, agree on the terms and you’ll get an unique code.

How to use google drive on linux

Copy this code back in the application and you are done.

Congrats: now you have a new directory under your $HOME/Google Drive that contains all your Gdrive files and that you can sync (automatically or not) from your pc to Google Drive.

Note: By default grive tools start automatically with your session and Auto Sync is ON by default so no need to sync manually. If new files are copied to your Google Drive folder or file are changed, these files will automatically be uploaded to your Google Drive online after a few seconds.
If you prefer to manually synchronize your Google Drive folder, simply de-select Auto Sync and click on Sync Now from the Google Drive Indicator menu.

google-drive-ocamlfuse

google-drive-ocamlfuse is a FUSE filesystem backed by Google Drive, written in OCaml. It lets you mount your Google Drive on Linux.

Features

  • Full read/write access to ordinary files and folders
  • Read-only access to Google Docs, Sheets, and Slides (exported to configurable formats)
  • Multiple account support
  • Duplicate file handling
  • Access to trash ( .Trash directory)

Installation

The easiest way it’s to build and install google-drive-ocamlfuse from its source. So, you need to install prerequisites such as FUSE.

$ sudo apt-get install ocaml camlp4-extra
$ git clone https://github.com/OCamlPro/opam.git
$ cd opam
$ ./configure
$ make
$ sudo make install
$ sudo apt-get install m4 libcurl4-gnutls-dev libfuse-dev libsqlite3-dev
$ opam init
$ opam update
$ opam install google-drive-ocamlfuse

After successful build, the google-drive-ocamlfuse binary will be found in

The easiest way to install it it’s via the PPA, for Ubuntu 13.10, 13.04, 12.10, 12.04. In order to to install it, use the commands below:

Archlinux
google-drive-ocamlfuse is available in the AUR (thanks to mlq for the package). To install it, run:

Basic Usage

As first thing, you have to authorize google-drive-ocamlfuse with Google. To do this, run the following command:

This will open a tab in your default web browser, asking to allow google-drive-ocamlfuse to access your Google Drive. Grant the permissions and you are done, this command will create the default application directory (

/.gdfuse/default), containing the configuration file.

After this you can mount the filesystem with the following command:

Now we can access our Google Drive directly from the file manager like a normal drive or external drive installed in our system.
To unmount the filesystem, you can use the following command:

How to use google drive on linux

Google Drive allows users to store and share files; to edit documents (using Google Docs), spreadsheets (using Google Sheets), and presentations (using Google Slides) with collaborators and each account comes with 15 GB of free storage (Google Photos and Gmail included). As awesome as it is, Google is yet to provide an official client app for Linux.

We have covered desktop client apps that you can use in the meantime, but because you might have missed a couple of them we have decided to compile the top 5 into a list for you to review. Today, therefore, we bring you the Top 5 Google Drive Clients for Linux.

1. Grive2

Grive2 is an independent open source implementation of Google Drive’s client for Linux.

How to use google drive on linux

Grive2 – Google Drive Desktop Client for Linux

It is written in C++ and interacts with Google Drive via its REST API. It features single directory synchronization, dry-sync, and partial sync.

After downloading it, run it to begin syncing and you’ll be good to go.

2. CloudCross – Multi-Cloud Client

CloudCross enables the synchronization of local files and directories across several cloud services.

It features support for Google drive, Cloud Mail, and Microsoft’s OneDrive; an optional direct file upload via URL, and automatic bidirectional document conversion from MS Office and Open Office document format to Google Docs.

3. RClone – Rsync for Cloud Storage

Rclone is a command line-based synchronization app for directories. Apart from being an excellent desktop client app for Google Drive, you can sync it with your Amazon S3, Dropbox, and Yandesk accounts, among others.

Rclone features one-way directory sync, syncing between two different accounts, an encryption e.t.c.

4. google-drive-ocamlfuse

Don’t be frightened by the name, google-drive-ocamlfuse is a CLI fuse-based filesystem backed by Google itself, and with it you can perform directory operations on your Google Drive account.

It features syncing with multiple accounts, access to Google Drive’s trash directory, and read-only access to Google docs, sheets, and slides.

5. GoSync

GoSync is a GUI-enabled Google Drive client for Linux. It is written in Python and released under the GNU General Public License 2. It has not been perfected enough to compete with Google Drive clients on Windows, for example, but it gets the job done.

It features an automatic regular sync every 10 minutes which although cannot be turned off, can be paused. As a GUI app, it shows you how much storage you have left on your Google Drive and the type of files occupying the space.

So there you have it guys. The top 5 Google Drive clients for Linux. Are there any apps you think should have made it to the list instead? Add your suggestions to the comments section below.

Despite being super popular among desktop users, Google didn’t release any official Linux client yet. Well, that’s not enough to stop the Linux community. Thanks to their endless effort, it’s now possible to mount your Google Drive as a virtual drive on your system.

In this guide, let’s check out how to mount and use Google Drive on Linux Mint.

As there’s no official Linux client from Google, we have to take the help of a 3 rd -party tool to do the job. There are plenty of tools available on the internet for a similar purpose.

Rclone

If you’re interested in working with CLI, then Rclone is going to be your favorite one. Rclone is free and open-source software written using GO programming language. Using Rclone, you can also serve local or remote files over HTTP/FTP/SFTP/WebDAV/dlna.

Rclone does not only support Google Drive but a bunch of other popular services like Dropbox, Alibaba Cloud (Aliyun), Amazon Drive, Amazon S3, Box, DigitalOcean Spaces, Microsoft OneDrive, Nextcloud, Oracle Cloud Storage, pCloud, Yandex Disk, Wasabi and a lot more!

For the full list of supported services, check out the official Rclone website.

Installing Rclone

Installing Rclone on Linux Mint is very simple. It’s just a matter of running a few commands.

Fire up the terminal and make sure that all the software on your system is up-to-date.

How to use google drive on linux

Now, install Rclone.

How to use google drive on linux

Rclone is also available as a snap. For installing a snap package, you need the Snap core set first. Learn how to use a snap package. Run the following commands for installing the Rclone snap package.

Configuring Rclone

Now, it’s time to configure Rclone. The configuration process doesn’t take much time. It only requires a handful of simple steps.

Fire up the terminal and start configuring Rclone.

How to use google drive on linux

At first, we have to make a new “remote”. Enter “n”.

How to use google drive on linux

Now, provide a name for the new connection. In my case, it’s going to be “myGoogleDrive”.

It’s time to select which service you want to use. In our case, we need Google Drive. Enter “7”.

How to use google drive on linux

As of the “client_id” and “client_secret”, leave them blank.

Next up, enter “y” to use auto-configuration.

How to use google drive on linux

The tool will pop up the default browser and ask you for logging into your account. Log into your Google account.

How to use google drive on linux

When asked, click “Allow”.

How to use google drive on linux

At this point, you can go back to the Rclone console. Enter “y”.

Voila! The remote connection creation is complete!

How to use google drive on linux

Now, we don’t have anything to do here. Enter “q”.

How to use google drive on linux

Mounting Google Drive

Finally, it’s time to mount Google Drive on a local folder. Let’s get started.

At first, create a directory for mounting the Google Drive files.

Now, tell Rclone to mount Google Drive on the folder.

The mount is ready to be accessed from your file manager. Whatever you do with the directory will be updated with your Google Drive cloud storage.

How to use google drive on linux

Unmounting Google Drive

From the console window, press “Ctrl + C”.

It’s a FUSE-based file system that’s backed by Google Drive. Written in OCaml, this tool also offers easy mounting of your Google Drive storage on your Linux system. You can access the files and folders directly from your file manager and command line.

This tool also comes up with excellent features like multiple account support, symbolic links, duplicate file handling, maintaining UNIX permissions and ownerships and others.

Without further ado, let’s get started with google-drive-ocamlfuse. Check out google-drive-ocamlfuse.

Installing google-drive-ocamlfuse

For Ubuntu and Ubuntu-based distros, the easiest way to go is by adding a PPA. It would allow easier installation and updates of google-drive-ocamlfuse.

Fire up a terminal and run the following commands.

How to use google drive on linux

Introduction

Google Drive is a very convenient tool, although everyone should be familiar with this tool, before starting to describe how to download files using the wget command, I will briefly introduce it.

Google Drive is an online storage space provided by Google. We can easily place our files on the Internet and if it is not for our permission, other people can’t download the files we upload.

Since the files are uploaded by ourselves, we can also download them at any time, just log in to our Google account.

It should be noted that the free account only has a capacity of 15GB, and you need to pay if you want to get more space. (Noe there are many e-mail with unlimited capacity in many schools)

Next I will enter the topic: I will record how to use the wget command in Linux to download files from Google Drive.

It’s a very convenient function. For example, today we put the files that we want to share with others on Google Drive and we just need to write down a wget command as a shell script file, we can easily pass the lightweight shell script to others, and it was donwloaded by others.

Use wget command to download files from Google Drive

First, we put the files we want to share with others on Google Drive.

How to use google drive on linuxFor example I want to share this beautiful Chinese character with others

And then we need to set the sharing permission, right-click on the file you want to share and select Share.

然後,我們需要設定分享的權限,一開始的設定應該只有『本人可以存取』。對著要分享的檔案點擊右鍵,並選擇 “Share” (分享)。

How to use google drive on linux

Then select the permission as Anyone on the internet can find and view.

How to use google drive on linux

After setting it up, we can finally let everyone download it. But before using wget , we need to find the download URL.

How to use google drive on linux

Enter this link, this link URL is not yet a download URL, just a place where you can view the file.

How to use google drive on linux

Click the icon of the download arrow.

How to use google drive on linux

The website that pops up, the URL above it is the real download URL. The way to distinguish is very simple, it will end with download.

So, what we have to do next is simple. Open our terminal:

-O test.png refers to naming the file we downloaded test.png, and remember that the download URL must be enclosed in double quotes.

How to use google drive on linux

This is a success. However, if you want to share a large number of files at once, it is recommended to use compressed files when uploading.