upload files to google drive from the command line1 min read

Prabhin Prabharkaran Administrator
DevOps Engineer

He is a Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!

follow me

upload files to google drive from the command line

Hi Techrunnr Readers, this document deals with how to upload files to google drive from the command line.

Here is the package or binary called gdrive for uploading files to google drive using the command line.
Many command line users were waiting for this tool. This tool is not from Google drive, is a command line tool by Petter Rasmussen.


1. Download the command line tool.

wget https://docs.google.com/uc?id=0B3X9GlR6EmbnWksyTEtCM0VfaFE&export=download

2. Change the downloaded file name to gdrive

You will be seeing a file called uc?id=0B3X9GlR6EmbnWksyTEtCM0VfaFE

mv uc\?id\=0B3X9GlR6EmbnWksyTEtCM0VfaFE gdrive

3. Add Execute permission

chmod +x gdrive

4. Copy the gdrive to binaries to make available

cp gdrive /usr/local/bin/gdrive

5. Now you have done with the installation part. Now gdrive needs authentication with your google drive account, for this execute the following command.

gdrive list

Now go to the following link and copy the authentication code.

6. Now upload the file to your google drive using the follwoing command.

gdrive upload filename

Explore more features in gdrive using

gdrive help

© 2018, Techrunnr. All rights reserved.

Questions Answered
Articles Written
Overall Points

Related posts

2 Thoughts to “upload files to google drive from the command line”

  1. Hello

    Get the below error, as of March 2020, when the URL (listed by gdrive list) is entered in the browser


    Sign in with Google temporarily disabled for this app

    This app has not been verified yet by Google in order to use Google Sign In.

  2. torresfaith4

    Hi, i got the same error now, please advise on what to do, articles online does not seem to help.

Leave a Reply