您(Are)是否使用Google Drive存储文件但不知道如何将其同步到Ubuntu?
Google 不为Linux用户提供非基于浏览器的文件客户端。( non-browser-based file client)但是有几个免费和低成本的工具可以帮助您。以下是您可以选择遵循的三种方法。
ODrive(开放式驱动器)(ODrive (Open Drive))
ODrive是一个开源图形用户界面客户端,用于将Ubuntu同步或备份到您的Google Drive。
无需打开网络浏览器或使用终端工具。这很简单,因为没有可供理解和掌握的选项、设置或集成。
安装和设置(Installation & Setup)
- 您现在将看到一个对话框,询问您是否要安装 flatpack 应用程序。选择确定(OK)。
- 您现在将看到软件存储库包含在平面包应用程序中。点击下一步(Click) 安装(install)。
- 下一步将要求您使用Sudo 密码( Sudo password)(您的根帐户密码)验证您的帐户。点击认证(authenticate)。
- 下载和安装完成后,按键盘上的超级键( super key)或 Windows 键。
- 在搜索框中 键入ODrive 。
- 单击打开驱动器(Open Drive)。您将看到ODrive现在正在运行并且需要进行设置。
- 现在您需要设置和验证您的Google Drive。单击(Click) 下一步(next)运行 ODrive 设置。
- 连接您的帐户并选择您要存储Google Drive(Google Drive)数据的文件夹位置。
- 完成 ODrive 设置后,您需要登录您的Google Drive帐户。
- ODrive会询问您是否可以访问您的Google帐户。你想允许(allow)它。
- 您现在将看到您的帐户已添加到您的Drive,并且还在您的Linux机器上创建了一个目录。
- 单击同步(synchronize)按钮以将您的Google Drive数据与您的Linux计算机同步。
- 要验证您的同步是否正确完成,请查看您的主文件夹。您会看到文件管理器中有一个名为Google Drive 的文件夹。(Google Drive.) 双击(Double)Google Drive文件夹以查看其中的文件。
然而,这种简单性也有一个缺点。由于它是一个基本选项,因此您不能使用选择性同步,也不能从下载中排除特定文件。
您只能将所有Google Drive文件同步到您的计算机。您可以选择全部或全部不同步 – 同步全部或不同步。如果您需要自定义同步哪些文件的能力,这将不是您的最佳解决方案。
这是自定义要同步到您的Google Drive的文件的选项。以下步骤概述了如何使用Insync。
同步中(Insync)(Insync)
Insync是一种适用于新的和更高级的Linux 用户(users)的工具。它提供命令行界面 ( CLI ) 和图形用户界面 ( GUI )。使用Insync,您可以:
该产品不是免费的,但有 15 天的免费试用期。定价选项( pricing options)(一次性费用)是:
- Prime:每个 Google 帐户 39.99 美元。
- 团队:每个Google(Google)帐户49.99 美元(包括Prime和共享驱动器同步)。
按照以下步骤使用Insync将您的(Insync)Ubuntu安装同步到您的Google Drive。
安装不同步(Install Insync)
- 首先通过选择DEB安装程序在您的计算机上安装(DEB)Insync。请务必在运行程序之前关闭所有Google Drive客户端。(Google Drive)
- 现在您已准备好安装该程序。在安装过程中,系统会提示您设置Insync文件夹。
- 这个Insync文件夹是您的Google Drive文件所在的位置。打开程序。您将看到的第一件事是您的Google Drive目录。
Insync在您安装时不会自动同步您的文件。系统将提示您确定要同步的特定文件。
选择文件(Choose The Files)
- 要开始选择性地同步文件,请单击仪表板右上角的选择性同步图标。
- 您将看到的下一个屏幕是选择性同步模式。这是您可以选择要同步的文件和文件夹的屏幕。
- 如果您想同步文件夹中的特定文件而不是所有文件,您也可以这样做。单击文件夹时,您将能够看到该文件夹中的子文件夹和文件。
- 要同步整个驱动器,请单击全选。(select all.)
- 选择要同步到Google Drive的文件和文件夹后,单击应用(apply)继续下一步。
- 此时,您将看到一条弹出消息,询问您是否确定要应用选择性同步更改。如果您确定,请单击是(yes)。
保存到 Insync 之外的位置(Saving To a Location Outside Of Insync)
您还可以将Google Drive文件夹保存到(Google Drive)Insync之外的其他位置,但仅限于顶级文件夹。
返回您的Google Drive并将鼠标悬停在您要同步的文件夹上。然后单击同步到自定义位置(sync to a custom location)图标,如下面的屏幕截图所示。
- 选择文件夹后,单击仪表板右上角的打开(open)。然后会给你两个选择。您的选择是将其同步为子文件夹或将其与另一个现有文件夹合并。
- 如果要将文件同步为子文件夹,请单击蓝色按钮:同步为子文件夹(Sync as a subfolder)。然后,您将被带回您的Google Drive。打开要放置同步子文件夹的文件夹的位置。
- 将在您的同步文件所在的位置创建新文件夹。
Ubuntu GNOME 内置方法(Ubuntu GNOME Built-in Method)
同步所有文件的另一个选项是Ubuntu GNOME内置方法。
按照以下过程将您的Google Drive与Ubuntu同步。您将把您的Google帐户添加到您的GNOME 在线帐户(GNOME Online Accounts)列表中。
首先,您需要将您的Google Drive帐户挂载到您的Nautilus 文件管理器(Nautilus File Manager)。然后,您将能够访问、添加和编辑您的文件。
安装和打开 GNOME(Install & Open GNOME)
- 您将通过Nautilus 文件管理器访问您在(Nautilus file manager.)Google Drive上的文件。(Google Drive)首先安装GNOME 控制中心(GNOME Control Center)和GNOME 在线帐户(GNOME Online Accounts)包。
- 转到Unity 仪表板(Unity Dashboard)或命令行以打开GNOME 控制中心(GNOME Control Center)。
- 在命令行部分键入GNOME 控制中心。(GNOME control center)然后点击在线账户(Online Accounts)。
- 点击添加账户。(add account.)然后选择Google并添加您的Google帐户详细信息。
- 接下来,系统将提示您授权从GNOME访问,以便您可以编辑和获取您的Google Drive文件。
请注意,除非您在Internet上,否则此过程不会让您访问您的Google Drive。但是,这是将云中的Ubuntu与(Ubuntu)Google Drive同步的一种简单而有效的方法。
如果您需要离线使用文件,可以将其从Google 云端硬盘(Google Drive)拖到计算机上的本地文件夹中。
尽管谷歌(Google)没有官方客户端供Ubuntu上的(Ubuntu)Linux用户同步文件,但从上面的三个选项中可以看出,有一些简单的方法可以完成同样的事情。
How To Sync Ubuntu To Your Google Drive
Are you using Google Drive to store your files but don’t know how to sync it to Ubuntυ?
Google does not provide a non-browser-based file client for Linux users. But there are several free and low-cost tools to help you. Below are three methods you can choose to follow.
ODrive (Open Drive)
ODrive is an open-source graphic user interface client to sync or backup Ubuntu to your Google Drive.
There is no need to open a web browser or use terminal tools. It’s simple, as there are no options, settings, or integrations to understand and master.
Installation & Setup
- To install, go to ODrive and click install.
- You will now see a dialogue box asking if you want to install the flatpack application. Select OK.
- You will now see that the software repository is included with the flat-pack application. Click install next.
- The next step will ask you to authenticate your account using your Sudo password (your root account password). Click authenticate.
- Once the download and installation are complete, press the super key or Windows key on your keyboard.
- Type ODrive into the search box.
- Click on Open Drive. You will see that ODrive is now running and needs to be set up.
- Now you need to set up and authenticate your Google Drive. Click next to run the ODrive setup.
- Connect your account and select the folder location where you want to store your Google Drive data.
- After you have completed your ODrive settings, you will need to sign into your Google Drive account.
- ODrive will ask you if it can have access to your Google account. You want to allow it.
- You will now see that your account has been added to your Drive and also made a directory on your Linux machine.
- Click the synchronize button to sync your Google Drive data with your Linux machine.
- To verify that your syncing was completed correctly, look inside your home folder. You will see that there is a folder in your file manager that says Google Drive. Double click on the Google Drive folder to see your files inside.
However, there is a downside to this simplicity. As it is a basic option, you can’t use selective sync and can’t exclude specific files from downloading.
You can only sync ALL your Google Drive files to your computer. You have an all or none option – sync all or none of them. If you need the ability to customize which files you sync, this will not be the best solution for you.
Here is an option to customize which files to sync to your Google Drive. The steps below outline how to use Insync.
Insync is a tool for both new and more advanced Linux users. It offers both a command-line interface (CLI) and a graphical user interface (GUI). With Insync, you can:
- Get desktop notifications.
- Use it with multiple accounts.
- Sync shared files.
The product is not free but comes with a 15-day free trial period. The pricing options (one-time fees) are:
- Prime: $39.99 per Google account.
- Teams: $49.99 per Google account (includes Prime plus shared drives sync).
Follow the steps below to use Insync to sync your Ubuntu installation to your Google Drive.
Install Insync
- Start by installing Insync on your computer by choosing the DEB installer. Be sure to turn off any Google Drive clients before running the program.
- Now you are ready to install the program. During the installation process, you will be prompted to set up an Insync folder.
- This Insync folder is where your Google Drive files will be located. Open the program. The first thing you will see is your Google Drive directory.
Insync doesn’t automatically sync your files when you install it. You will be prompted to identify the specific files you want to sync.
Choose The Files
- To start selectively syncing your files, click on the selective sync icon on the top right-hand corner of your dashboard.
- The next screen you will see is the selective sync mode. This is the screen where you can select the files and folders you want to sync.
- If you want to sync specific files within a folder and not all of them, you can do that too. When you click on the folder, you will be able to see the sub-folders and files within that folder.
- To sync your entire drive, click select all.
- After you have selected the files and folders you want to sync to your Google Drive, click apply to move on to the next step.
- At this point, you will see a pop-up message asking if you are sure you want to apply your selective sync changes. If you are sure, click yes.
- You will find your synced files and folders in your base folder.
Saving To a Location Outside Of Insync
You can also save your Google Drive folder to a different location outside of Insync, but only for top-level folders.
Go back to your Google Drive and hover your mouse over the folder you want to sync. Then click on the sync to a custom location icon as seen in the screenshot below.
- You will then see a menu prompting you to choose the location.
- Once you have selected your folder, click open in the top right section of your dashboard. Then you will be given two choices. Your options are to sync it as a subfolder or merge it with another existing folder.
- If you want to sync the file as a subfolder, click the blue button that says: Sync as a subfolder. You will then be taken back into your Google Drive. Open the location of the folder where you want to put the synced subfolder.
- The new folder will be created where your synced files are located.
Ubuntu GNOME Built-in Method
Another option to sync all your files is the Ubuntu GNOME built-in method.
Follow the process below to sync your Google Drive with Ubuntu. You will be adding your Google account to your GNOME Online Accounts list.
First, you will need to mount your Google Drive account to your Nautilus File Manager. Then you will be able to access, add, and edit your files.
Install & Open GNOME
- You will access your files on Google Drive through the Nautilus file manager. Start by installing the GNOME Control Center and the GNOME Online Accounts packages.
- Go to your Unity Dashboard or command line to open the GNOME Control Center.
- Type GNOME control center in the command line section. Then click on Online Accounts.
- Click on add account. Then select Google and add your Google account details.
- Next, you will be prompted to authorize access from GNOME so you can edit and get your Google Drive files.
Note that this process does not give you access to your Google Drive unless you are on the Internet. However, it is an easy and effective way to sync your Ubuntu in the cloud with your Google Drive.
If you need to use a file offline, you can drag it from your Google Drive and to a local folder on your computer.
Even though Google doesn’t have an official client for Linux users on Ubuntu to sync your files, as you can see from the three options above, there are simple ways to accomplish the same thing.