SEARCH

How-To Geek

How to Mount a Remote Folder in 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.

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.

screenshot_006

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

Start by clicking on Places > Connect to Server.

sshot-1

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.

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.

screenshot_001

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.

screenshot_002

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.

screenshot_003

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

screenshot_004

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>).

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

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).

screenshot_005

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.

Trevor is our resident Linux geek, but always keeps his eyes open for neat Windows tricks too.

  • Published 07/21/10

Comments (5)

  1. Jerry Nolte

    Excellent tip. This will save me a TON of time! Thank you!

  2. Pavel M

    Great!! Didn’t realize I can do such a thing, although it makes sense when I think about it. Good bye scp and wget :)

    Thanks for sharing this!

  3. KBead

    What service type would I use to connect to an Apple router/HD?

  4. Cags

    Wow! all that arsing around with sshfs and ‘Connection reset by peer errors.

  5. Michelle

    I’m using xubuntu and can’t find the places/connect to server anymore. I would like nfs mount to other linux (or webdav). i dont mind using terminal.

Enter Your Email Here to Get Access for Free:

Go check your email!