用 OneDriver GUI 工具在 Linux 中挂载微软 OneDrive
OneDrive
在 Windows 上，微软提供了一个 [免费云存储服务](https://itsfoss.com/cloud-services-linux/) OneDrive。它与 Windows 集成，你可以通过你的微软账户获得 5GB 的免费存储空间。


这在 Windows 上很好用，但和谷歌一样，微软也没有在 Linux 桌面上提供 OneDrive 的本地客户端。


当然，你可以通过浏览器访问你的 OneDrive 数据。除此以外，还有一些其他的方法可以在 Linux 上访问 OneDrive。


你可以使用像 [Insync](https://itsfoss.com/use-onedrive-on-linux/) 这样的高级服务，或者选择用 [rclone 在 Linux 上使用 OneDrive](https://itsfoss.com/use-onedrive-linux-rclone/) 这种稍微复杂的命令行方式。


最近，我发现了另一个工具，它稍有不同，使用起来也更简单。不出所料，它叫 OneDriver。


### OneDriver：在你的 Linux 系统上挂载 OneDrive


![OneDrive Linux illustration](/data/attachment/album/202108/13/220636gaa1qvsdlirzxub9.png)


[OneDriver](https://github.com/jstaf/onedriver) 是一个自由而开源的工具，允许你在 Linux 系统上挂载 OneDrive 文件。


请记住，它不会像 OneDrive 在 Windows 系统上那样同步文件。它将 OneDrive 文件挂载在本地的挂载点上。你通过网络访问这些文件。


然而，它确实提供了一种混合方法。你在挂载的 OneDrive 中打开的文件也被下载到系统中。这意味着，你也可以离线访问打开的文件。如果你没有连接到互联网，这些文件将成为只读。


如果你在本地对文件做任何修改，并且连接到互联网，它就会反映到 OneDrive 上。


我注意到，在 GNOME 上的 Nautilus 文件管理器中，它会自动下载当前文件夹中的图像。在我的印象中，它们只有在我打开它们时才会被下载。


另一件事是，Nautilus 一开始会建立缩略图缓存。OneDriver 在开始的时候可能会觉得有点慢，有点耗费资源，但最终会好起来。


哦！你也可以挂载多个 OneDrive 账户。


### 安装和使用 OneDriver


要在 Ubuntu 20.04（和 Linux Mint 20 系列）上安装 OneDriver，你可以使用 OneDriver 开发者的这个 PPA：



```
sudo add-apt-repository ppa:jstaf/onedriver
sudo apt update
sudo apt install onedriver

```

对于 Ubuntu 21.04，你可以下载 [其 PPA 中的 DEB 文件](https://launchpad.net/~jstaf/+archive/ubuntu/onedriver/+packages) 来使用它。


在 Fedora 上，你可以添加这个 COPR：



```
sudo dnf copr enable jstaf/onedriver
sudo dnf install onedriver

```

Arch 用户可以在 AUR 中找到它。


安装后，在菜单中搜索 OneDriver，然后从这里启动它。


![Search for OneDriver](/data/attachment/album/202108/13/220638t92p3ju9cz9wgjof.png)


首次运行时，它会给出一个奇怪的空界面。点击 “+” 号，选择一个文件夹或创建一个新的文件夹，OneDrive 会挂载在那里。在我的例子中，我在我的家目录下创建了一个名为 `One_drive` 的新文件夹。


![Click on + sign to add a mount point for OneDrive](/data/attachment/album/202108/13/220640etypz2yzgq6eqgpo.png)


当你选择了挂载点后，你会被要求输入你的微软凭证。


![one drive login](/data/attachment/album/202108/13/220640bylmg2r4lhhl4ggw.png)


![one drive permission](/data/attachment/album/202108/13/220642byrd36m6mk0y3m03.png)


登录后，你可以在挂载的目录中看到 OneDrive 的文件。


![OneDrive mounted in Linux](/data/attachment/album/202108/13/220643zbwum0jmgbbhpchb.png)


完成这些后，你可以在应用界面上看到你的 OneDrive 账户。点击旁边的勾按钮，以在重启后自动挂载 OneDrive。


![Autostart OneDriver mounting](/data/attachment/album/202108/13/220645wi2rdz0wpwapw99u.png)


总的来说，OneDriver 是一个可以在 Linux 上访问 OneDrive 的不错的免费工具。它可能无法像 [高级 Insync 服务](https://itsfoss.com/recommends/insync/) 那样提供完整的同步设施，但对于有限的需求来说，它做得不错。


如果你使用这个漂亮的工具，请分享你的使用经验。如果你喜欢这个项目，也许可以给它一个 [GitHub 上的星标](https://github.com/jstaf/onedriver)。




---


via: <https://itsfoss.com/onedriver/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
On Windows, Microsoft provides a [free cloud storage service](https://itsfoss.com/cloud-services-linux/) in the form of OneDrive. It comes integrated with Windows and you get 5 GB of free storage with your Microsoft account.

This works great on Windows but like Google, Microsoft also does not provide a native client for OneDrive on Linux desktop.

You can access your OneDrive data through browser, of course. In addition to that, there are some other ways to access OneDrive on Linux.

You can use a premium service like [Insync](https://itsfoss.com/use-onedrive-on-linux/) or opt for a slightly more complicated command line approach with [rclone to use OneDrive on Linux](https://itsfoss.com/use-onedrive-linux-rclone/).

Recently, I came across another tool that is slightly different and slightly easier to use. It’s unsurprisingly called OneDriver.

## OneDriver: Mount OneDrive on your Linux system

![one drive linux](https://itsfoss.com/content/images/wordpress/2021/08/one-drive-linux.png)

[OneDriver](https://github.com/jstaf/onedriver) is a free and open source tool that allows you to mount your OneDrive files on your Linux system.

Please keep in mind that it does not sync files in the same way OneDrive does on the Windows system. It mounts the OneDrive files on a local mount point instead. You access the files over the network.

However, it does provide a kind of hybrid approach here. The files you open in the mounted OneDrive also get downloaded on the system. Which means that you can access the opened files offline as well. The files become read-only if you are not connected to the internet.

If you make any changes to files locally, it gets reflected on the OneDrive if you are connected to the internet.

I did notice that in Nautilus file manager on GNOME, it downloads the images present in the current folder automatically. I was under the impression that they will only be downloaded when I open them.

Another thing is that Nautilus builds thumbnail cache initially. OneDriver may feel a little bit slower and resource consuming in the beginning, but it gets better eventually.

Oh! You can also mount multiple OneDrive accounts.

## Installing and using OneDriver

To install OneDriver on Ubuntu 20.04 (and Linux Mint 20 series), you can use this PPA by the developer of OneDriver:

```
sudo add-apt-repository ppa:jstaf/onedriver
sudo apt update
sudo apt install onedriver
```


For Ubuntu 21.04, you may use it by downloading the [DEB file from its PPA](https://launchpad.net/~jstaf/+archive/ubuntu/onedriver/+packages).

On Fedora, you can add this COPR:

```
sudo dnf copr enable jstaf/onedriver
sudo dnf install onedriver
```


Arch users can find it in the AUR.

Once you install it, search for OneDriver in the menu and start it from here.

![search for onedriver](https://itsfoss.com/content/images/wordpress/2021/08/search-for-onedriver.png)

On the first run, it gives a strange looking empty interface. Click on the + sign and choose a folder or create a new one where you’ll mount the OneDrive. In my case, I created a new folder named One_drive in my home directory.

![onedriver interface](https://itsfoss.com/content/images/wordpress/2021/08/onedriver-interface.png)

When you have selected the mount point, you will be asked to enter your Microsoft credential.

one drive login one drive permission

Once you are successfully logged in, you can see your files from OneDrive in the mounted directory.

![one drive mounted in linux](https://itsfoss.com/content/images/wordpress/2021/08/one-drive-mounted-in-linux-800x491.png)

Once you have done that, you can see your OneDrive account on the application interface. Click on the toggle button beside it to autostart OneDrive mounting after restart.

![auto start onedriver](https://itsfoss.com/content/images/wordpress/2021/08/auto-start-onedriver.png)

Overall, OneDriver is a nice free utility for accessing OneDrive on Linux. It may not provide the complete sync facility like the but it works fine for limited needs.

If you use this nifty tool, do share your experience with it. If you like project, maybe give it a [star on GitHub](https://github.com/jstaf/onedriver).