Tips&Tricks Mount Google Drive on Ubuntu 26.04+ with rclone

Overview

Since Ubuntu 26.04 no longer includes native Google Drive support in its file manager, rclone provides a reliable command-line solution to mount Google Drive as a virtual filesystem on your Ubuntu machine.

How rclone Works

rclone is a command-line program that syncs files and directories to and from cloud storage providers, including Google Drive. It works by:

  • Mounting your Google Drive as a virtual filesystem on your Ubuntu machine
  • Syncing files between your local system and the cloud
  • Copying, moving, and managing files directly from the terminal or file explorer (once mounted)

Step-by-Step Guide to Using rclone with Google Drive on Ubuntu 26.04

1. Install rclone

Open a terminal and run:

sudo apt update
sudo apt install rclone

2. Configure rclone for Google Drive

Run the following command to start the setup:

rclone config

Follow the prompts:

  • Select n for a new remote
  • Name it (e.g., gdrive)
  • Choose Google Drive as the storage type (for me it was number 18)
  • Leave the client_id and client_secret blank (press Enter) unless you have custom OAuth credentials
  • Select 1 / Full access all files, excluding Application Data Folder for scope
  • Use auto-config (select 1) to let rclone open a browser window for authentication
  • Log in to your Google account and grant permissions
  • Confirm the configuration by selecting y when asked

3. Mount Google Drive as a Local Filesystem

Create a local directory to mount Google Drive:

mkdir ~/google-drive

Now, mount Google Drive using:

rclone mount gdrive: ~/google-drive \
	--vfs-cache-mode full \
	--dir-cache-time 1000h \
	--attr-timeout 1000h \
	--vfs-cache-max-age 24h \
	--vfs-cache-max-size 10G \
	--vfs-read-ahead 128M \
	--daemon \
	--log-file="$HOME/rclone.log"
  • gdrive: is the name of your remote (from step 2)
  • --vfs-cache-mode full improves performance by caching files locally
  • --dir-cache-time 1000h keeps directory listings cached instead of asking Google Drive again every few minutes
  • --attr-timeout 1000h keeps file attributes (size, date) cached in the kernel
  • --vfs-cache-max-age 24h removes cached files that were not accessed for 24 hours
  • --vfs-cache-max-size 10G limits the local cache to 10 GB
  • --vfs-read-ahead 128M reads ahead when opening files, so larger files stream more smoothly
  • --daemon runs the mount in the background
  • --log-file writes the log to ~/rclone.log for troubleshooting

Why the long cache times? Nautilus constantly lists directories and reads file attributes (e.g. for thumbnails). With the short defaults every one of these requests goes to Google Drive, which makes Nautilus block and freeze. With long cache times the answers come from the local cache. Changes made on Google Drive are still picked up, because rclone polls Google Drive for changes (every minute by default) and updates the cache.

Note: To unmount, use:

fusermount -u ~/google-drive

4. Access Google Drive from File Explorer

  • Open your file explorer (Nautilus)
  • Navigate to ~/google-drive (or the directory you created)
  • You’ll see your Google Drive files and can interact with them as if they were local

5. (Optional) Auto-Mount on Startup

To mount Google Drive automatically when you log in:

  1. Create a script (e.g., ~/mount_gdrive.sh):

    #!/bin/bash
    REMOTE="gdrive:"
    MOUNTPOINT="$HOME/google-drive"
    LOG="$HOME/rclone.log"
    
    rclone mount "$REMOTE" "$MOUNTPOINT" \
    	--vfs-cache-mode full \
    	--dir-cache-time 1000h \
    	--attr-timeout 1000h \
    	--vfs-cache-max-age 24h \
    	--vfs-cache-max-size 10G \
    	--vfs-read-ahead 128M \
    	--daemon \
    	--log-file="$LOG"
    
  2. Make it executable:

    chmod +x ~/mount_gdrive.sh
    
  3. Add it to your startup applications:

    • Open Startup Applications from the app menu
    • Add a new entry with the command:
      /bin/bash /home/yourusername/mount_gdrive.sh
      
    • Replace yourusername with your actual username

How It Works in Practice

  • Files are not downloaded until you access them (saves bandwidth)
  • Changes made in ~/google-drive are synced to Google Drive in real time
  • You can use any app (e.g., LibreOffice, GIMP) to open/edit files directly from the mounted folder

Additional Tips

Check Active Mounts

To see all currently mounted rclone filesystems:

mount | grep rclone

View Transfer Statistics

While mounted, you can check sync activity:

rclone mount gdrive: ~/google-drive --vfs-cache-mode full --daemon --stats 10s

Common Issues

Permission denied on fusermount:

# Add your user to the fuse group
sudo usermod -aG fuse $USER
# Then log out and back in

rclone mount command not found: Ensure you’ve installed rclone correctly and the package is up to date:

sudo apt install --reinstall rclone

Authentication expired: Re-run rclone config and re-authenticate with Google.

Summary

Using rclone to mount Google Drive on Ubuntu 26.04+ provides a seamless way to access your cloud files as if they were local, filling the gap left by the removal of native Google Drive integration. The solution is lightweight, scriptable, and works with any application that can read/write files.