How to share files across your network using popular Linux GUIs

How to Easily Create Network Shares on Your Linux Machine without Using the Command Line - Let Me Show You How


I regularly share files and folders across my home network from Linux. In fact, I have one machine that houses a particular folder that is home to all of my first-draft manuscripts. When I decided I’d rather keep those files in-house (instead of risking a third-party cloud provider using them to train AI neural networks), Samba was the obvious solution.

For someone who’s used Linux for decades, setting up a Samba share is a no-brainer. For those who are new to the open-source operating system, it’s not quite as simple. Thankfully, two of the most popular Linux GUIs (GNOME and KDE Plasma) make it a bit easier to create those shares.

I want to walk you through the process of doing just that, so you can create network shares on your Linux machine with ease.

How to share files across your network from these Linux GUIs

First: Installing Samba

What you’ll need: To make this work, you’ll need a Linux distribution with either the GNOME or KDE Plasma desktop environments. You’ll also need a user with sudo privileges. That’s it. Let’s make it happen. I’ll demonstrate on a Ubuntu-based distribution (Pop!_OS). If you use a Fedora-based distribution, make sure to swap out apt-get for the dnf package manager during the Samba installation process.

  1. Install Samba In case your Linux distribution didn’t ship with Samba pre-installed, you can install it with the command:
sudo apt-get install samba -y

If your distribution is Fedora-based, that command would be:

sudo dnf install samba -y
  1. Add and enable your user for Samba access By default, users need to be added and enabled for Samba usage. This only requires two commands. The first adds the user to Samba with the command:
sudo smbpasswd -a USERNAME

Where USERNAME is your Linux username.

You’ll first be prompted for your sudo password and required to type and verify a password for Samba.

Next, you must enable the user with the command:

sudo smbpasswd -e USERNAME

Where USERNAME is your Linux username.

Sharing from GNOME

  1. Install the Nautilus extension To make this work with the Natilus file manager (aka “Files”), you need to install a piece of software with the command:
sudo apt-get install nautilus-share -y

If your distribution uses dnf, that command is:

sudo dnf install nautilus-share -y
  1. Restart Nautilus You can restart Nautilus with the command:
nautilus -q
  1. Share your folder Open Nautilus and locate the folder you want to share. Right-click that folder and select Local Network Share.

If you don’t see this menu entry, you might want to log out and log back in.

  1. Configure the share In the resulting pop-up window, click the checkbox for Share this folder. Once you’ve done that, you can name the share, and then (if you want to give permission for users to alter the contents of the share) click the checkbox for Allow others to create and delete files in this folder. If you want to allow anonymous logins to the share, you can click the checkbox for Guest access (although I wouldn’t recommend that for security reasons).

Click Create Share, and then, when prompted, click Add the permissions automatically. If you receive an error that includes “net usershare’ returned error 255,” you’ll need to run the following two commands:

sudo mkdir -p /var/lib/samba/usershares/
sudo chmod go+rwx /var/lib/samba/usershares/

Once you’ve done that, you should be able to access the shared folder from your network.

Sharing from KDE Plasma

  1. Install the filesharing component Log into KDE Plasma and open the Konsole app. Issue the command:
sudo apt-get install kdenetwork-filesharing -y

If your distribution is based on Fedora, that command would be:

sudo dnf install kdenetwork-filesharing -y

You’ll then need to go through the same process outlined above for adding and enabling your users for Samba shares.

  1. Open the Share tab for the folder to be shared Right-click on the folder you want to share and click Properties. In the resulting pop-up, click on the Share tab.

  2. Fix the permissions At the top of the Share tab, you’ll probably see a warning with a button marked Fix Permissions. Click that button. When prompted, click Change Permissions.

  1. Enable the share Back at the Share tab, click the checkbox for Share this folder with other computers on the local network. Once you’ve done that, you can then configure the share by giving it a name and allowing/configuring guest access. I would suggest leaving Everyone with Read-Only permissions and giving your user Full Control. Once you’ve done that, click OK.

Once you’ve taken care of these steps, you can share any folder (so long as you have permission to access it) from your Linux machine to your network.

Additional Topics: Q&A

Q: Can I share folders between Linux and Windows using Samba? A: Yes, Samba allows you to share folders between Linux and Windows computers. By setting up Samba on your Linux machine and configuring the necessary permissions, you can seamlessly share files and folders across different operating systems. This makes collaboration between Linux and Windows users much easier.

Q: Are there any security concerns when using Samba shares? A: Like any network service, it’s important to consider security when using Samba shares. To enhance security, it is recommended to use strong passwords for Samba users and limit guest access. Additionally, keep your Samba software up to date to ensure you have the latest security patches.

Q: Can I access Samba shares from a mobile device? A: Yes, you can access Samba shares from mobile devices. There are file manager apps available for iOS and Android that support connecting to Samba shares. By installing one of these apps, you can browse and manage files on your Samba shares directly from your mobile device.

Q: Is there a graphical interface for managing Samba shares on Linux? A: Yes, there are several graphical tools available for managing Samba shares on Linux. Besides the Nautilus extension mentioned in the article, you can also use tools like system-config-samba and SWAT (Samba Web Administration Tool) to configure and manage Samba shares through a user-friendly interface.

The Impact and Future of Samba

Samba, being a powerful tool for file and print sharing, has had a significant impact on the ease of sharing files across different operating systems. Its ability to bridge the gap between Linux, Windows, and other operating systems has made it an essential component in many network environments.

Looking forward, Samba will continue to play a vital role in facilitating seamless collaboration and file sharing between different platforms. With the increasing popularity of cloud storage and remote file access, Samba’s flexibility and cross-platform compatibility will remain highly relevant in the years to come.

Reference List

  1. Best Cloud Storage Services in 2024 (Expert Reviewed)
  2. Linux Kernel 6.8 offers some exciting new features and ‘fixes all over’
  3. Stop Popup Ads on your Samsung Phone or Tablet
  4. BigLinux makes Linux easy for anyone – and it should be way more popular
  5. The top cloud storage services you can buy to protect your files

Now that you’ve learned how to create network shares on your Linux machine using GNOME and KDE Plasma, why not give it a try? Sharing files and collaborating with others on your home network has never been easier. If you found this article helpful, share it with your friends and colleagues on social media. Happy sharing! 😄🚀