Tuxdrive – A Commandline Google Drive Client For Linux
There are plenty of Graphical Google drive clients out there. But, the commandline clients are so few. Today, we will be discussing about a commandline google drive client called Tuxdrive. This utility will be helpful for those who stay in Terminal mostly. Tuxdrive is a free console-based Google drive client for Unix-like operating systems. Using Tuxdrive, we can access google drive from Terminal, and also we can download/upload, manage all our stuffs in Google drive. It is completely free and open source.
Tuxdrive – A Commandline Google Drive Client For Linux
Installing Tuxdrive On Ubuntu
First, we need to install the required prerequisites pip3, and then install google-api-python-client which is used to authenticate with your Google drive.
First, let us install pip3.
On Ubuntu and derivatives like Linux Mint, run the following command to install pip3.
$ sudo apt-get install python3-pip
After installing pip3, install google-api-python-client using command:
$ sudo pip3 install google-api-python-client
Finally, download the latest Tuxdrive .deb package from here and install it as shown below. As of writing this guide, the latest version was 1.0.10.
$ wget https://github.com/prahladyeri/tuxdrive/releases/download/v1.0.10/tuxdrive.deb
$ sudo apt-get install gdebi
$ sudo gdebi tuxdrive.deb
Once installed, open Tuxdrive by running the following command:
If your browser is on a different machine then exit and re-run this application with the command-line parameter –noauth_local_webserver.
$ tuxdrive --noauth_local_webserver
When you run tuxdrive the first time, it will open up the browser window and ask for permissions to access your google drive on your behalf. Click Allow.
Copy the verification code:
And, paste it in your Terminal and hit ENTER.
Once the authentication process is successful, you will be landed in tuxdirve prompt.
Now, you can start accessing your Google Drive using Tuxdrive client from the Terminal.
To list all files and directories in the google drive, run:
tux_drive> ls Credentials fetched successfully. DIRECTORY Technology DIRECTORY Books DIRECTORY Information Security 2 DIRECTORY OSTechNix DIRECTORY Linux DIRECTORY Ultimate IQ Tests - Philip Carter & Ken Russell DIRECTORY Malware DIRECTORY Kodaikanal Trip DIRECTORY Office DIRECTORY ESSN Training Session DIRECTORY .. FILE tuxlogo FILE END FILE END.docx FILE END.docx FILE Technical notes FILE Create USB bootable disk FILE Install Kali Linux Tools FILE How can one become part of the 1%? FILE Cloud Authentication1.docx FILE Cloud Authentication1.docx 20 items found.
To list all files and folders in current local working directory in google drive, run either !dir or !ls.
tux_drive> !dir FILE .bash_logout FILE .wget-hsts DIRECTORY Public DIRECTORY .shutter DIRECTORY .config DIRECTORY .local DIRECTORY .gconf DIRECTORY .gnome2 FILE .bashrc FILE .sudo_as_admin_successful FILE 208_374679378.pdf DIRECTORY Downloads FILE .profile DIRECTORY Videos DIRECTORY Documents DIRECTORY .mozilla DIRECTORY .thumbnails FILE .xsession-errors.old FILE .Xauthority DIRECTORY .cache DIRECTORY .gnupg DIRECTORY Pictures FILE .dmrc FILE examples.desktop FILE .ICEauthority FILE tuxdrive.deb FILE .xsession-errors DIRECTORY Music FILE .bash_history DIRECTORY Desktop DIRECTORY .dbus DIRECTORY Templates DIRECTORY .gnome2_private 33 items found. Local Working Directory is /home/ostechnix tux_drive>
To change the current local working directory:
tux_drive> lcd Downloads/ Directory changed to Downloads/
To print current working directory in your drive, run:
tux_drive> pwd Remote Working Directory is /(root) tux_drive>
Similarly, to print the local working directory, use “lpwd” command:.
tux_drive> lpwd Local Working Directory is /home/ostechnix/Downloads
To download a file from Google drive, use “pull” command like below.
tux_drive> pull 208_374679378.pdf File found: /208_374679378.pdf Credentials fetched successfully. Downloading: 0B88FP2CC57vMc2sxR01aVGEwUDZtX0xpMW9nazBLM0VDdS0w(208_374679378.pdf) Downloaded successfully to /home/ostechnix/208_374679378.pdf
All files will be downloaded in the current working directory i.e $HOME directory.
To upload files to google drive, use “push” command like below.
tux_drive> push tuxdrive.deb Uploading tuxdrive.deb Credentials fetched successfully. Upload successful Credentials fetched successfully. tux_drive>
To create a new directory in your drive, run the following command in the tuxdrive console.
tux_drive> mkdir senthilkumar Uploading senthilkumar Credentials fetched successfully. Upload successful Credentials fetched successfully. tux_drive>
The above command will create a directory named “senthilkumar” in the Google drive.
To change to the newly created directory, run:
tux_drive> cd senthilkumar Credentials fetched successfully. Remote directory changed to /senthilkumar (0B88FP2CC57vMbWp6YXlCNnQ3aWM) tux_drive>
To check where we are now, use “pwd” command:
tux_drive> pwd Remote Working Directory is /senthilkumar(0B88FP2CC57vMbWp6YXlCNnQ3aWM)
To go back to the root directory in google drive, run:
tux_drive> cd / Credentials fetched successfully. Remote directory changed to / (root)
To remove a file or directory in drive, run:
tux_drive> rm senthilkumar senthilkumar is a directory. Are you sure you want to delete it? (Y/n)y Credentials fetched successfully. Item 0B88FP2CC57vMbWp6YXlCNnQ3aWM deleted.
To view the help section, run “help”.
tux_drive> help Commands: help (or ?): Shows this help facility. dir (or ls): Lists all files and folders on drive. !dir (or !ls): Lists all files and folders in current directory. pull <item>: Pulls the named file/folder from drive to current working directory. push <item>: Pushes the named file/folder from current working directory to drive. rm <item>: Delete the named file/folder on remote path. pwd: Print working directory (remote/drive) cd: Change working directory (remote/drive) lpwd: Print working directory (local) lcd: Change working directory (local) rdcache: Show remote directory mapping of id and folder paths. rfcache: Show remote files mapping of id and folder paths. mkdir: Create a directory on remote path. exit: Exits this program. tux_drive>
Since Tuxdrive is very new and under active development, there will be bugs. If you find any bugs, notify to the developer in the GitHub page given below.
Thanks for stopping by!
Help us to help you:
- Subscribe to our Email Newsletter : Sign Up Now
- Support OSTechNix : Donate Via PayPal
- Download free E-Books and Videos : OSTechNix on TradePub
- Connect with us: Facebook | Twitter | Google Plus | LinkedIn | RSS feeds
Have a Good day!!