Back to articles

Share drive or folder using Samba - Ubuntu

Published: 2024-08-24

NOTE: I found NFS is quicker and easier and have an article of that here:

NFS Share setup (Ubuntu)

  1. Install samba
sudo apt install samba
  1. Modify your config
sudo nano /etc/samba/smb.conf
  1. Skip to the bottom and add this section:
[whateveryouwantyoursharetobenamed]
path = /path/to/your/share
available = yes
valid users = yourusername
read only = no
browsable = yes
public = no
writable = yes

Ctrl O to write, then Ctrl X to leave

  1. Then, make an smb user:
sudo smbpasswd -a yourusername
  1. Then restart samba:
sudo systemctl restart smbd
sudo systemctl restart nmbd

You can now access your share via \servnameorIP\sharename on your network.