Mount Google Drive with Rclone: A Quick Guide

Rclone is a powerful tool for syncing files between cloud storage and your local system. In this guide, we’ll configure Rclone, add Google Drive, and mount it to a local directory for easy access.

Step 1: Install Rclone

Download and install Rclone from the official site. Follow the setup instructions for your operating system.

Step 2: Configure Rclone

Open your terminal and run:

rclone config

Select n to create a new remote, and name it gdrive.

Choose Google Drive as the storage type (typically option 13).

Step 3: Authenticate

Rclone will prompt you to authenticate with Google Drive. Select auto config if you are using a system with a browser. Grant permission when prompted, and an access token will be generated.

Step 4: Complete Setup

Accept the default settings unless you have specific customizations in mind. Verify the setup by listing your remotes:

rclone listremotes

You should see:

gdrive:

Step 5: Mount Google Drive

Create a local mount point:

mkdir -p /path/to/local/mount

Mount Google Drive:

rclone mount gdrive:/path/to/files /path/to/local/mount
  • gdrive: The name of your remote.
  • /path/to/files: The path in your Google Drive to mount.
  • /path/to/local/mount: The local directory where the drive will be mounted.

To run the mount in the background, add & at the end of the command:

rclone mount gdrive:/path/to/files /path/to/local/mount &

Automate Mount with Crontab

To automatically mount Google Drive at system startup, use crontab:

  1. Open crontab for editing:
    crontab -e
    
  2. Add the following line:
    @reboot rclone mount gdrive:/path/to/files $HOME/gdrive
    
  3. Save and exit the editor.

Unmounting Google Drive

To unmount Google Drive, use the following command:

fusermount -u /path/to/local/mount

For macOS, use:

umount /path/to/local/mount

Conclusion

With Rclone, you can easily mount Google Drive locally, providing seamless access to your cloud files. Enjoy syncing your data effortlessly!