ubuntu共享文件夹挂载_如何在Ubuntu中挂载远程文件夹

ubuntu共享文件夹挂载_如何在Ubuntu中挂载远程文件夹

ubuntu共享文件夹挂载

Gone are the days of finding a good FTP client and reading man pages trying to find out how the heck fuse works – mounting remote folders in Ubuntu nowadays is a breeze.

飘是找到一个很好的FTP客户端,阅读手册页试图找出到底保险丝是如何工作的日子-在Ubuntu安装远程文件夹现在是轻而易举的事。

Note: This method was tested in Ubuntu 10.04, but should work similarly for Ubuntu 8.04 and later. For older versions of Ubuntu, please see this article.

注意:此方法已在Ubuntu 10.04中进行了测试,但在Ubuntu 8.04及更高版本中应类似地工作。 对于旧版本的Ubuntu,请参阅本文

ubuntu共享文件夹挂载_如何在Ubuntu中挂载远程文件夹

Regardless of whether the remote computer is using FTP, SSH, WebDAV or Samba to share files, the method is basically the same.

无论远程计算机是使用FTP,SSH,WebDAV还是Samba共享文件,方法都基本相同。

Start by clicking on Places > Connect to Server.

首先单击“位置”>“连接到服务器”。

ubuntu共享文件夹挂载_如何在Ubuntu中挂载远程文件夹

Choose the type of service that you want to connect though, and then fill out the details for that server.

选择您想要连接的服务类型,然后填写该服务器的详细信息。

In our case, we’re going to connect to another Ubuntu machine through SSH, to ensure that data is transferred securely. We’ll use that machine’s IP address directly, but a host name like www.howtogeek.com works just as well.

在本例中,我们将通过SSH连接到另一台Ubuntu计算机,以确保安全地传输数据。 我们将直接使用该机器的IP地址,但是像www.howtogeek.com这样的主机名也可以使用。

Adding the server to your bookmarks is optional, but is nice if you’re going to access that server a lot, as it will show up in the Places menu and the bookmarks section of the file browser.

将服务器添加到书签是可选的,但是如果您打算经常访问该服务器,则很好,因为它将显示在文件浏览器的“位置”菜单和“书签”部分中。

ubuntu共享文件夹挂载_如何在Ubuntu中挂载远程文件夹

Since we’re using SSH, we get a message that this is the first time we’re connecting to this server. Choose to Log In Anyway.

由于我们使用的是SSH,因此我们收到一条消息,这是我们第一次连接到该服务器。 选择仍然登录。

ubuntu共享文件夹挂载_如何在Ubuntu中挂载远程文件夹

While you specified the user name earlier, the password for this server is entered now. You can choose to remember the password forever, which is convenient, or you can choose to forget it if you’re on a public machine.

在您先前指定用户名的同时,现在输入该服务器的密码。 您可以选择永久记住密码,这很方便,或者如果您使用的是公用计算机,则可以选择忘记密码。

ubuntu共享文件夹挂载_如何在Ubuntu中挂载远程文件夹

And that’s it! A link should appear on your desktop, and double-clicking it open the resource in the file browser.

就是这样! 链接应出现在您的桌​​面上,然后双击它在文件浏览器中打开资源。

ubuntu共享文件夹挂载_如何在Ubuntu中挂载远程文件夹

But what if you need to use that resource from the command line? No problem!

但是,如果您需要从命令行使用该资源怎么办? 没问题!

The link to the mounted remote resource is found in ~/.gvfs/ (where ~ is a shortcut for your home folder – that is, /home/<username>).

可以在〜/ .gvfs /中找到指向已安装的远程资源的链接(其中〜是您的主文件夹的快捷方式,即/ home / <用户名>)。

To get there, open a terminal window (Applications > Accessories > Terminal) and enter the following in the terminal window.

要到达那里,请打开一个终端窗口(应用程序>附件>终端),然后在终端窗口中输入以下内容。

cd ~/.gvfs/

cd〜/ .gvfs /

Entering ls will allow you to see the any mounted remote resources. You may find that tab completion will help you greatly here (type in the first few letters of the link, and then hit tab and the rest will be completed automatically).

输入ls将允许您查看任何已安装的远程资源。 您可能会发现制表符补全将在这里为您提供很大帮助(键入链接的前几个字母,然后单击制表符,其余的将自动完成)。

ubuntu共享文件夹挂载_如何在Ubuntu中挂载远程文件夹

If you chose to add a bookmark earlier, then your remote resource is always a couple of mouse-clicks away! Sure beats having to use FTP clients and command-line utilities.

如果您选择早些时候添加书签,那么您的远程资源总是只需单击几下鼠标! 必须使用FTP客户端和命令行实用程序。

翻译自: https://www.howtogeek.com/howto/22518/how-to-mount-a-remote-folder-in-ubuntu/

ubuntu共享文件夹挂载