Mount Google Drive on Linux Using rclone
rclone is the modern standard for mounting Google Drive on Linux — it’s actively maintained, handles authentication reliably, and works across distributions without compilation.
Install rclone
Most distributions package rclone. Install via your package manager:
# Debian/Ubuntu
sudo apt install rclone
# Fedora/RHEL
sudo dnf install rclone
# Arch
sudo pacman -S rclone
Or install the latest version directly:
curl https://rclone.org/install.sh | sudo bash
Configure rclone for Google Drive
Start the configuration wizard:
rclone config
Follow the interactive prompts:
- Create a new remote — name it
gdrive(or your preference) - Choose
driveas the storage type - Leave client ID and secret blank (rclone uses built-in credentials)
- Select your preferred scope:
- Full access: Access all files on your Drive
- Drive.file: Access only app-created files (more restrictive, safer)
- Authorize by visiting the provided URL in your browser and grant permissions
This creates ~/.config/rclone/rclone.conf with your credentials. Verify the file contains an [gdrive] section with your token.
Mount Google Drive
Create a mount directory:
mkdir -p ~/gdrive
Mount your Drive:
rclone mount gdrive: ~/gdrive --vfs-cache-mode full &
Your Google Drive is now accessible at ~/gdrive. The --vfs-cache-mode full flag caches files locally for better performance and offline access.
Mount options
For better reliability and performance, use these options:
rclone mount gdrive: ~/gdrive \
--vfs-cache-mode full \
--vfs-cache-max-age 168h \
--cache-dir ~/.cache/rclone \
--allow-other \
--no-checksum \
--dir-cache-time 1h
What each option does:
--vfs-cache-mode full— Cache entire files locally for offline access and repeated read performance--vfs-cache-max-age 168h— Keep cached files for 7 days before re-fetching--cache-dir ~/.cache/rclone— Store cache in a dedicated directory (easier cleanup)--allow-other— Allow other system users to access the mount (requiresuser_allow_otherin/etc/fuse.conf)--no-checksum— Skip checksum verification on uploads (faster, use only if you trust your network)--dir-cache-time 1h— Cache directory listings for 1 hour (reduces API calls)
Unmount
Unmount the drive:
fusermount -u ~/gdrive
Or if you mounted in the background:
killall rclone
Persistent mount with systemd
For automatic mounting on login and auto-recovery on failure, create a user systemd service.
Create ~/.config/systemd/user/rclone-gdrive.service:
[Unit]
Description=rclone Google Drive mount
After=network-online.target
Wants=network-online.target
[Service]
Type=notify
ExecStart=/usr/bin/rclone mount gdrive: %h/gdrive \
--vfs-cache-mode full \
--vfs-cache-max-age 168h \
--cache-dir %h/.cache/rclone \
--dir-cache-time 1h \
--log-level INFO
ExecStop=/bin/fusermount -u %h/gdrive
Restart=on-failure
RestartSec=5
[Install]
WantedBy=default.target
Enable and start the service:
systemctl --user daemon-reload
systemctl --user enable --now rclone-gdrive.service
Check status:
systemctl --user status rclone-gdrive.service
journalctl --user -u rclone-gdrive.service -f
Multiple Google Drive accounts
To mount multiple accounts, create separate remotes during rclone config. For example:
rclone config
# Create remotes: [gdrive-personal], [gdrive-work], etc.
Then create separate systemd services for each:
cp ~/.config/systemd/user/rclone-gdrive.service ~/.config/systemd/user/rclone-gdrive-work.service
Edit rclone-gdrive-work.service and change:
Description=rclone Google Drive mount (Work)ExecStart=/usr/bin/rclone mount gdrive-work: %h/gdrive-work ...ExecStop=/bin/fusermount -u %h/gdrive-work
Then enable and start:
systemctl --user daemon-reload
systemctl --user enable --now rclone-gdrive-work.service
Security and performance considerations
Credential security: Credentials in ~/.config/rclone/rclone.conf are stored in plain text. Restrict permissions:
chmod 600 ~/.config/rclone/rclone.conf
chmod 700 ~/.config/rclone
Quota management: The mounted drive exposes your entire Google Drive. Avoid accidentally recursive copies with cp -r or rsync, which consume quota quickly. Use rclone copy for intentional transfers:
# Safe transfer with rclone
rclone copy gdrive:path/to/folder ~/local-backup
Initial indexing: Large directories may take time to list on first access. Subsequent access is faster thanks to the directory cache and VFS cache.
Bandwidth: Repeated file access is served from the local cache, reducing API calls and bandwidth. Monitor ~/.cache/rclone size; it persists until manually deleted.
SELinux/AppArmor: If the mount fails silently, check your system’s mandatory access control logs. You may need to configure policies to allow FUSE mounts.
Symlinks: FUSE mounts handle symlinks inconsistently across tools. Test symlink operations with your workflow before relying on them.

Thank you for the write up on how to install google-drive-ocamlfuse. After I installed opam, I try to run the opam install google-drive-ocamlfuse, but it is breaking on the install of sqlite3-ocaml.2.0.4.
I am getting error:
Package sqlite3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `sqlite3.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘sqlite3′ found
E: Failure(“Command ”/root/.opam/4.00.1/bin/ocamlbuild’ lib/libsqlite3_stubs.a lib/dllsqlite3_stubs.so lib/sqlite3.cma lib/sqlite3.cmxa lib/sqlite3.a lib/sqlite3.cmxs -tag debug’ terminated with error code 2″)
Can you advise?
I tried it again on my system (Fedora 19 x86-64). After installing several needed packages, it works for me:
# yum install sqlite-devel fuse-devel libcurl-devel zlib-devel
`opam` needs some headers from the Linux system. Hope this can helps you. You may need to install more packages it `opam` reports it.
Along with the dependencies listed above I also needed to install m4 on my Fedora 19 x86-64 system
#yum install m4
One of the opam dependencies needed it (ocamlfind).
Thanks for sharing the information.
Thanks for the tutorial. In the momento of the apply the command: $ opam install google-drive-ocamlfuse, i receive a error message: The former state can be restored with opam switch import -f “/home/kingars/.opam/4.01.0/backup/state-20140020125053.export”
‘opam install google-drive-ocamlfuse’ failed.
Hi Alex,
The google-drive-ocamlfuse requires some packages installed on your system: http://www.fclose.com/4687/mounting-google-drive-on-linux/#comment-1046451862
Missing these packages possibly makes the compilation fail.
Hello,
The following was prompted on Fedora 19:
[waldyd@localhost-live ~]$ opam install google-drive-ocamlfuse
The following actions will be performed:
– install cryptokit.1.9 [required by gapi-ocaml]
– install camlp4.4.02.1+system [required by extlib]
– install sqlite3-ocaml.2.0.7 [required by google-drive-ocamlfuse]
– install ocamlnet.3.7.6 [required by gapi-ocaml]
– install extlib.1.6.1 [required by gapi-ocaml]
– install gapi-ocaml.0.2.6 [required by google-drive-ocamlfuse]
– install google-drive-ocamlfuse.0.5.10
=== 7 to install ===
Do you want to continue ? [Y/n] Y
=-=- Synchronizing package archives -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=- Installing packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Copying ~/.opam/repo/default/packages/camlp4/camlp4.4.02.1+system/files/install to ~/.opam/system/build/camlp4.4.02.1+system/
Copying ~/.opam/repo/default/packages/camlp4/camlp4.4.02.1+system/files/check-camlp4.sh to ~/.opam/system/build/camlp4.4.02.1+system/
Building camlp4.4.02.1+system:
sh ./check-camlp4.sh
[ERROR] The compilation of camlp4.4.02.1+system failed.
Removing camlp4.4.02.1+system.
Nothing to do.
Building cryptokit.1.9:
make
make install
[ERROR] The compilation of cryptokit.1.9 failed.
Removing cryptokit.1.9.
ocamlfind remove cryptokit
Building sqlite3-ocaml.2.0.7:
ocaml setup.ml -configure –prefix /home/waldyd/.opam/system
ocaml setup.ml -build
ocaml setup.ml -install
[ERROR] The compilation of sqlite3-ocaml.2.0.7 failed.
Removing sqlite3-ocaml.2.0.7.
ocamlfind remove sqlite3
#=== ERROR while installing camlp4.4.02.1+system ==============================#
# opam-version 1.2.0
# os linux
# command sh ./check-camlp4.sh
# path /home/waldyd/.opam/system/build/camlp4.4.02.1+system
# compiler system (4.02.1)
# exit-code 1
# env-file /home/waldyd/.opam/system/build/camlp4.4.02.1+system/camlp4-14957-e7966f.env
# stdout-file /home/waldyd/.opam/system/build/camlp4.4.02.1+system/camlp4-14957-e7966f.out
# stderr-file /home/waldyd/.opam/system/build/camlp4.4.02.1+system/camlp4-14957-e7966f.err
### stdout ###
# …[truncated]
# 4.02 by switching to a local installation via `opam switch 4.02.1`.
#
# Here are some installation instructions for camlp4 if you obtained OCaml
# via the OPAM binary packages:
#
# http://software.opensuse.org/download.html?project=home%3Aocaml&package=ocaml
#
# * Debian/Ubuntu: sudo apt-get install camlp4-extra
# * RHEL/CentOS/Fedora: sudo yum install ocaml-camlp4
#
### stderr ###
# ./check-camlp4.sh: line 3: camlp4orf: command not found
#=== ERROR while installing cryptokit.1.9 =====================================#
# opam-version 1.2.0
# os linux
# command make
# path /home/waldyd/.opam/system/build/cryptokit.1.9
# compiler system (4.02.1)
# exit-code 2
# env-file /home/waldyd/.opam/system/build/cryptokit.1.9/cryptokit-14968-d2d111.env
# stdout-file /home/waldyd/.opam/system/build/cryptokit.1.9/cryptokit-14968-d2d111.out
# stderr-file /home/waldyd/.opam/system/build/cryptokit.1.9/cryptokit-14968-d2d111.err
### stdout ###
# ocaml setup.ml -configure
### stderr ###
# …[truncated]
# Use Bytes.set instead.
# File “/home/gildor/programmation/oasis/src/oasis/OASISFindlib.ml”, line 256, characters 6-24:
# Warning 3: deprecated: Lazy.lazy_from_fun
# Use Lazy.from_fun instead.
# W: Field ‘ocamldoc’ is not set
# W: Not_found
# W: Not_found
# E: Cannot find external tool ‘ocamldoc’
# E: Failure(“1 configuration error”)
# make: *** [setup.data] Error 1
#=== ERROR while installing sqlite3-ocaml.2.0.7 ===============================#
# opam-version 1.2.0
# os linux
# command ocaml setup.ml -configure –prefix /home/waldyd/.opam/system
# path /home/waldyd/.opam/system/build/sqlite3-ocaml.2.0.7
# compiler system (4.02.1)
# exit-code 1
# env-file /home/waldyd/.opam/system/build/sqlite3-ocaml.2.0.7/sqlite3-ocaml-14995-ad8886.env
# stdout-file /home/waldyd/.opam/system/build/sqlite3-ocaml.2.0.7/sqlite3-ocaml-14995-ad8886.out
# stderr-file /home/waldyd/.opam/system/build/sqlite3-ocaml.2.0.7/sqlite3-ocaml-14995-ad8886.err
### stderr ###
# …[truncated]
# File “setup.ml”, line 247, characters 8-26:
# Warning 3: deprecated: String.set
# Use Bytes.set instead.
# File “setup.ml”, line 2502, characters 6-24:
# Warning 3: deprecated: Lazy.lazy_from_fun
# Use Lazy.from_fun instead.
# W: Field ‘ocamldoc’ is not set
# W: Not_found
# E: Cannot find external tool ‘ocamldoc’
# E: Failure(“1 configuration error”)
=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following failed
– install camlp4.4.02.1+system
– install cryptokit.1.9
– install sqlite3-ocaml.2.0.7
Due to the errors, the following have been cancelled
– install extlib.1.6.1
– install gapi-ocaml.0.2.6
– install ocamlnet.3.7.6
– install google-drive-ocamlfuse.0.5.10
[waldyd@localhost-live ~]$ sudo yum install ocaml-camlp4
Loaded plugins: langpacks, refresh-packagekit
Package ocaml-camlp4-4.02.1-3.1.i686 already installed and latest version
Nothing to do
wrote a small mount GUI to mount and unmount.
Hope you find it usefull.
http://cihanispanoglu.blogspot.com.tr/2014/12/google-drive-mount-gui-for-linux.html
Please, post this article for Debian distribution instead Fedora ;-)
Matias Colli
UNIX/Linux SysAdmin
I happened to be using Fedora when I wrote this post. The main method on Debian should be similar but needs some Debian-specific configuration. We always welcome contributions if you would like to write a post for Debian.
thanks got it working in fedora 22 x86_64
Great to know the method works for Fedora 22!