How to Access your Google Drive Account in Ubuntu

This article is about accessing your Google Drive Account through your Ubuntu system. The process involves adding your online Google account to your Gnome Online Accounts list. This configuration then lets you mount your Google Drive account to your Nautilus File Manager. After mounting, you can access your online files, edit them, and add new files directly from your Ubuntu to your Google Drive.

We have run the commands and procedures mentioned in this article on a Ubuntu 18.04 LTS system.

Here are a few simple steps that will let you configure your Google Drive on Ubuntu:

Step 1: Install and Open Gnome Online Accounts

Ubuntu 18.04 usually comes with Gnome Online Accounts utility in the System Settings by default. In case your system lacks it, you can install it as follows:

Open the Ubuntu command line, the Terminal, either through the system Dash or the Ctrl+Alt+T shortcut. Once the Terminal application opens, enter the following command as sudo:

$ sudo apt install gnome-online-accounts

Please remember that only an authorized user can add, remove and configure software on Ubuntu.

Install GNOME Online Accounts

The above output shows that Gnome Online Accounts utility is already installed on my system.

In case it is not installed, the system might prompt you with a y/n option to confirm initiating the installation procedure. Please enter Y and then hit Enter to continue.

Once the utility is installed on your system, you can open it through one of the following methods:

By entering the following command in your Terminal:

$ gnome-control-center online-accounts


Accessing the Settings utility by clicking the downward arrow located at the top-right corner of the Ubuntu GUI, and then clicking the settings icon from the following view:

Open Ubuntu Settings Utility

This will open the Settings utility in the Wi-Fi view; you can then switch to the Online Accounts view by clicking on the respective tab from the left panel.


Another simple way to open the Online Accounts utility is to search for it from the system Dash, as follows:

Open Online Accounts trough Dash

This is how the utility looks like by default:

Online Accounts Application

Step 2: Add your Google Account to the Online Accounts

Once you have opened the Online Accounts utility, you will be able to see a list of online apps whose account you can configure to be used through Ubuntu. In our case, we want to access the Google Drive account so we need to add our Google account to the list of online accounts. To do so, click on the Google option from the list. Please make sure that you are connected to the internet.

The following dialog will open for you to add your google account:

Sign in with Google

Enter your Gmail ID on which you are using Google Drive and then hit Enter. This will open the following view for you to enter the Password for this Gmail account:

Enter your password

Enter your password and hit Enter. The following dialog will appear:

Trust GNOME application

Through this dialog, you will be able to view the list of permissions you are allowing GNOME, or your local system, over your Google Drive.

Click the Allow button in order to give your Gnome access to your Google Drive. This will open the following dialog for you:

Give Ubuntu Desktop access to your Google drive

This dialog gives you a list of items for which you want to use the online account. You can always come back and configure these list of items. For now, please make sure that the Files slider button is turned on; only this way we will be able to access the Google Drive files through our Nautilus File Manager.

Please close this dialog and you will now be able to see your Google account added to the list of online accounts as follows:

Connect your data in the cloud

You can add multiple Google accounts to your Ubuntu in a similar manner.

You can now close the Settings utility.

Step 3: Mount Google Drive in Ubuntu File Manager

Open your Ubuntu File Manager and you will be able to see your Google account listed in the left panel as follows:

Ubuntu File Manager

There are two ways in which you can mount this account in your file manager.

The first method is to right-click on the account and then select the Mount option as follows:

Select Mount option

The other method is to simply click on the account; this will mount and open the Google Drive folder in your file manager.

How to Edit Files?

Please note that the files in your mounted directory are not actual files downloaded on your system. These are just instances of your online files that you can only access when you are connected to the Internet. In case you want to edit one of these files, you can access it from this mounted folder and make all the changes. Since your account is synced with the online Google Drive, the changes will be directly uploaded on the Internet. A faster approach is to copy the file to your local drive, make the changes(even offline) and then copy the file to the mounted folder.

How to add a file to Google Drive?

In order to add a file to your Google Drive through your Ubuntu, simply copy the file to the mounted folder while you are connected to the Internet.

How to unmount an account?

In order to unmount your Google Drive from the file manager, right-click on the account and select Unmount from the menu. This will disconnect your Google Drive from your Ubuntu storage.

How to Remove Google Drive Account?

The permanent way of disconnecting your Ubuntu from the Google Drive account is to remove your Google account from the Online Accounts list.

Open the Online Accounts settings and click on your added account under Google. This will open the following dialog:

Disconnect Ubuntu Desktop from Google

By clicking the Remove Account button, you will be able to remove the Google account from your online accounts.

These were a few easy steps through which you will be able to access and edit your Google Drive files from your Ubuntu system.