Want to access Google Drive from file manager in your Linux? It’s easy to do the trick in Ubuntu, Fedora, Debian, and most other Linux with common used desktop environments.
Modern Linux desktops today (e.g., GNOME and KDE) have built-in ‘Online Accounts‘ feature to easily access user data in the cloud with system built-in applications, such as file manager and email client.
XFCE and MATE does not have the feature, but GNOME’s ‘Online Accounts’ service works good in the 2 desktop environments. And, there are a few alternative third-party applications to do the job.
NOTE: This tutorial works in Ubuntu 22.04|20.04|18.04, Fedora Workstation with default GNOME Desktop. It also supports for Ubuntu, Debian, Fedora, Rocky Linux, and Manjaro with GNOME, KDE Plasma, XFCE or MATE desktop, or Linux Mint.
Setup Google Drive support in GNOME:
For Ubuntu, Fedora, and other Linux with GNOME desktop, first open “Settings” (aka Gnome Control Center) from top-right corner system menu.
Then go to “Online Accounts” tab in the left, and click on “Google” in the right to open the setup dialog.
In the pop-up dialog, login with your gmail account or phone number, and grant permissions access.
When done successfully, it should show you the ON/OFF switches for using the account for mail, calendars, contacts, photos, files and/or printers. And, you need to keep “Files” on for Google Drive access.
Finally, close the dialog. Open Files (aka Nautilus file manager), it should include your Google account in the left sidebar.
Click on it will open the folder to access Google Drive files. You can use it just like local folders with both read and write permissions.
Enable Google Drive support in KDE:
For KUbuntu, Ubuntu Studio and other Linux with KDE Plasma desktop, first search for and open “System settings” from start menu.
Then navigate to “Online Accounts” in the left, and click on bottom right “+ Add New Account” button.
In next page, click on “Google” to open the setup dialog. Then, login with your gmail account or phone number and grant permissions.
After that, go back to the previous ‘Online Account’ page and click on the account you just added to verify if “Google Drive” enabled.
If you don’t see “Drive” under the list of ‘Use This Account For’, open konsole from start menu and run command:
- Install kio-gdrive package for Debian/Ubuntu:
sudo apt install kio-gdrive
- For Fedora, CentOS:
sudo dnf install kio-gdrive
- And use command for Arch, Manjaro KDE
sudo pacman -S kio-gdrive
After installed the package, re-open “System Settings” and check your Google account in that page.
Finally, open the file manager (aka Dolphin), and click “Network” in the left sidebar to access your Google Drive documents.
Enable Google Drive support in Linux Mint:
Linux Mint also has similar function, just open “System Settings” and click on “Online Accounts” under Preferences.
Then select Google and login with your account. Like GNOME, your google account will be displayed in the left sidebar of Nemo file manager. And, click on it will open the folder for syncing Google Drive.
For XFCE & MATE desktop:
For XUbuntu, Linux Lite, Kali Linux, Ubuntu MATE and other Linux with XFCE or MATE Desktop, user can choose to use Gnome’s Online Accounts function.
Install Gnome Online Accounts
First, search for and open “terminal” from your system start menu. When it opens, run the command below to install Gnome’s online accounts and Gnome control center to configure it.
- For Debian, XUbuntu, Linux Lite, Kali Linux, etc, run command:
sudo apt install --no-install-recommends gnome-control-center gnome-online-accounts
- Fedora, Rocky Linux users can use the command below instead:
sudo dnf install --setopt=install_weak_deps=False gnome-control-center gnome-online-accounts
Launch the configuration page
The Gnome control center will not show in your system start menu in non-GNOME desktop, you need to open terminal and run command below to start it:
After pasting the command above in terminal and hitting Enter, the Gnome Settings utility should pop-up. User can then follow the first method in this tutorial to setup Google account.
When everything’s done successfully, open file manager and click your account name in the left panel to access Google Drive folders.
Use third-party software
There were a few open-source applications to do similar jobs in Linux, but they are mostly no-longer maintained. As far as I know, google-drive-ocamlfuse is the one that still working in current Ubuntu releases.
1. Install the app
The app so far only provides official packages for Ubuntu and it’s based systems, through the official Ubuntu PPA.
First, open terminal either from start menu or by pressing Ctrl+Alt+T on keyboard on keyboard. When it opens, run the commands below one by one:
- Add the PPA repository:
sudo add-apt-repository ppa:alessandro-strada/ppa
- Update package cache:
sudo apt update
- Finally, install the application:
sudo apt install google-drive-ocamlfuse
2. Setup Google Drive
After installation, run the command below in terminal to get start:
This command will open the Google login page in your web browser, ask you to login and grant permissions access.
Then, create a local folder to sync Google Drive documents and mount it via commands:
mkdir -p ~/GoogleDrive && google-drive-ocamlfuse ~/GoogleDrive
Finally, open file manager and go to the “GoogleDrive” folder to access your data in the cloud.
NOTE: This method has a downside. It slows down loading user home folder contents in my case, because of syncing content from the cloud.
(Optional) Unmount and remove the app
To unmount the Google Drive documents, open terminal and run command:
fusermount -u ~/GoogleDrive
You may then remove the local folder if you don’t use it anymore.
And, remove the applications if you want, by running command in terminal:
sudo apt remove google-drive-ocamlfuse
Also, remove the PPA repository by running command:
sudo add-apt-repository --remove ppa:alessandro-strada/ppa
This tutorial shows how to enable Google Drive support in Linux through system default file manager. For GNOME, KDE Plasma, and Linux Mint Cinnamon desktops, they have built-in “Online Accounts” service to do the job. MATE and XFCE users can use GNOME’s Online Accounts service. And, there’s a third-party application that should work in all desktop environments.