Tuesday, April 23, 2024

Ubuntu File Sharing

Datamation content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

Setting up various methods for Ubuntu file sharing has become easier over the years. In this article, I’ll highlight several of the available Ubuntu file sharing options. I’ll also point out where to find them and provide links for downloads.

NFS for Ubuntu

Perhaps the best option for Ubuntu users looking to share files across their local network is NFS (Network File System). Unlike other file sharing options for Ubuntu, NFS is designed for Linux environments. It is also the best-designed option for long-term networked directory shares. NFS is popular with Linux distributions and Network Attached Storage (NAS) servers thanks to its stability and its overall speed.

NFS is widely considered to be the preferred method for sharing files throughout a Linux-specific network. And setup, while a bit detailed, is perfectly duplicable thanks to the great Ubuntu file sharing guide linked above.

The downside to relying on NFS is that it’s not really a cross-platform file sharing solution. To better clarify, OS X NFS support is pretty good and Windows NFS support is also fair. But you should be warned — NFS isn’t necessarily the best solution for cross-platform needs. Despite its speed advantages, it’s a network setup best suited for permanent network deployments instead of casual directory sharing.

Samba for Ubuntu

Samba is an alternative networking implementation, which is both cross-platform and supports file sharing with printer sharing capabilities. Samba is a robust networking option that is commonly used among home users and those needing to mix their printer and file sharing together under one solution.

Some consider Samba easier to setup than NFS. I tend to disagree with this, especially if you’re actually verifying your Samba settings to make sure everything is set up according to the Samba for Ubuntu documentation, because it’s a lengthy process.

In the above section discussing NFS, I mentioned that NFS is faster than Samba. This isn’t always the case, as in some instances, you may find that Samba is actually out-performing NFS. I recommend running tests with both NFS and Samba to see which one is performing best for your network.

Getting Samba set up with other operating systems is fairly simple. OS X Samba support is fairly straightforward, while Windows Samba support is a bit more convoluted, depending on the version of Windows you happen to be connecting to.

The downside to using Samba for file sharing really comes down to the amazing number of methods for setting it up. A basic setup can be as simple as choosing to share a directory via nautilus-share or something complex such as using Samba as a domain controller. For a newer Ubuntu user, this is a lot to take in.

To make matters worse, the Ubuntu documentation divides the server and client guides into separate sections, which only adds to the confusion. With those points aside, the actual setup for a basic Samba setup from Ubuntu PC to Ubuntu PC is actually quite easy.

SSHFS for Ubuntu

Because I don’t consider NFS or Samba to be a secure method of file sharing between computers, SSHFS for Ubuntu is something that I feel needs to be covered here. As you may already know, SSH is a widely trusted method of connecting two separate computers for remote control tasks on another machine. What makes SSHFS so awesome, is that you gain all of the encrypted communication advantages offered by SSH in a locally mounted file system.

Setting up SSH on Ubuntu is a bit involved; however, it’s not really any more difficult than setting up a NFS server. Mounting a remote directory using SSHFS, on the other hand, is extremely simple on its own. Because SSH is set up out of the box to time out after an extended period of time, it’s important to make sure you’ve set up a server keep alive option. Adding ServerAliveInterval 5 to the server or the client, will ensure your mounted file system doesn’t time out due to inactivity.

The only real downside to using SSHFS is in the SSH setup itself. Speed can be another factor as files being placed inside of a SSHFS mounted directory aren’t always as fast as other file sharing methods. SSHFS for Windows requires the use of a Windows client called Dokan, while OS X users, will need to use FUSE for OS X.

NitroShare for Ubuntu

For an Ubuntu user interested in sending only one file at a time between PCs, NitroShare is a great file sharing solution. Unlike the options listed above, NitroShare allows you to share individual files, not directories, with other PCs. So if you’re needing to share a mounted directory between two PCs, this wouldn’t be the option for you. This tool would more closely resemble someone handing you a single item whereas Samba, NFS and SSHFS are closer to using a shared container.

The NitroShare application is available for Ubuntu (and other Linux distros), OS X and Windows. Unlike any of the directory sharing options listed above, this is simply an application which requires next to no configuration at all. It is a good choice if you only wish to share specific items between PCs and have no desire to network those same PCs together.

Ubuntu One

Ubuntu One is a cloud-based storage solution provided for Ubuntu users and supported by Canonical. It offers Ubuntu users a means of sharing files and even directories over a local network, in addition to making the same content available off-site as well. Available as both a limited-capacity free option or a higher-capacity paid solution, Ubuntu One is quite useful for those looking to keep PC content available in the cloud.

Unfortunately, it’s not really going to be a viable option for other platforms. While there is a Windows client that has been recently made available, sadly, other Linux distributions and OS X lack the option to sync with Ubuntu One. If you’re looking for a very Ubuntu-centric means of syncing up your Ubuntu files and directories and understand the storage limitations based on what you wish to spend, then perhaps Ubuntu One is a good option for you.


The last option I want to mention is a cloud-based file sharing service called Dropbox. Similar to Ubuntu One, Dropbox differs in that you can use it on any Linux distribution, OS X or Windows.

Like Ubuntu One, Dropbox gives users a finite amount of storage. Should the need for more storage space arise, you can always expand how much Dropbox will handle by purchasing more space. The only real difference between Dropbox and Ubuntu One from a file sharing standpoint is that Dropbox is genuinely, cross platform where Ubuntu One isn’t quite there just yet.

Which Ubuntu file sharing option is best?

Now that I’ve laid out ample options, I’ll conclude this article with a guide to help you choose the Ubuntu file sharing solution that’s going to work best for you.

Free and do it yourself: NFS, Samba and SSHFS are you best choices. If speed matters to you, you might want to consider NFS or Samba.

Paid and easy: Dropbox is the best option without question. While there are other solutions out there similar to Dropbox, I’ve found that when I need directories to sync between computers without hassles or errors, Dropbox is the way to go. If you use Ubuntu-based systems exclusively, then perhaps Ubuntu One is something to consider. If you’re simply looking to share individual files occasionally between PCs, then the last option would be to consider NitroShare.

Subscribe to Data Insider

Learn the latest news and best practices about data science, big data analytics, artificial intelligence, data security, and more.

Similar articles

Get the Free Newsletter!

Subscribe to Data Insider for top news, trends & analysis

Latest Articles