Skip to content

Linux Samba Guide

Mattscreative edited this page Dec 5, 2025 · 2 revisions

Linux Samba Guide

Complete beginner-friendly guide to Samba on Linux, covering Arch Linux, CachyOS, and other distributions including installation, file sharing, and Windows compatibility.


Table of Contents

  1. Samba Installation
  2. Samba Configuration
  3. Share Directories
  4. Access Shares
  5. Troubleshooting

Samba Installation

Install Samba

Arch/CachyOS:

# Install Samba
sudo pacman -S samba

# Enable service
sudo systemctl enable --now smb nmb

Debian/Ubuntu:

sudo apt install samba
sudo systemctl enable smbd nmbd

Fedora:

sudo dnf install samba
sudo systemctl enable smb nmb

Verify Installation

Check Samba:

# Check service
systemctl status smb

# Check version
smbclient --version

Samba Configuration

Edit Config

Configure Samba:

# Edit config
sudo vim /etc/samba/smb.conf

Basic Settings

Common settings:

[global]
workgroup = WORKGROUP
server string = Samba Server
security = user

[share]
path = /srv/samba/share
browsable = yes
writable = yes
valid users = username

Share Directories

Create Share

Add share:

# Edit smb.conf
sudo vim /etc/samba/smb.conf

Add:

[myshare]
path = /home/user/share
browsable = yes
writable = yes
valid users = user

Set Permissions

Configure permissions:

# Set directory permissions
chmod 755 /home/user/share

# Set ownership
chown user:user /home/user/share

Access Shares

Create Samba User

Add user:

# Create Samba user
sudo smbpasswd -a username

# Enable user
sudo smbpasswd -e username

Access from Windows

Windows access:

  1. Open File Explorer
  2. Address bar: \\server-ip\share
  3. Enter username/password
  4. Access files

Troubleshooting

Samba Not Working

Check service:

# Check status
systemctl status smb

# Check logs
journalctl -u smb

# Test config
testparm

Permission Issues

Fix permissions:

# Check directory permissions
ls -la /path/to/share

# Set correct permissions
chmod 755 /path/to/share
chown user:user /path/to/share

Summary

This guide covered Samba installation, configuration, and file sharing for Arch Linux, CachyOS, and other distributions.


Next Steps


This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.

Clone this wiki locally