Arch Linux Tutorial – Hello everyone, today we will show you how to install Samba on Arch Linux 2017. As you know, Samba is a special software that communicate between Linux and Windows workstation where lets us to share files and folders between Linux and Windows OS. With Samba, we can turn Arch Linux into a powerful File Server for our network. I am currently testing my Arch Linux for several purposes such as:
- Arch Linux as a multimedia streaming server with Emby Server
- Arch Linux as File Server using Samba
What you need ?
On this tutorial, you will need a working Arch Linux with internet connection. Most steps shown here were done via Terminal, so lets get our hands dirty. You may interested on the following articles to get started:
Steps to install Samba On Arch Linux 2017
Install Samba and required packages
sudo pacman -S samba smbclient
Create new smb.conf
cd /etc/samba sudo cp smb.conf.default smb.conf
Add new Shares
The default configuration found in smb.conf should works for most cases. Now we need to add a new share.
sudo nano /etc/samba/smb.conf
Now add the following lines to the bottom of the smb.conf. Please change it with your own.
[Share01] path = /shares/share01 writable = yes browseable = yes create mask = 0700 directory mask = 0700 read only = no guest ok = no
Create new samba group and samba user
#Create a new group called sambausers sudo groupadd -r sambausers #Add fitri to the sambausers group sudo passwd sambausers -a fitri #create new password for user fitri sudo smbpasswd -a fitri
The command will add user fitri to access the Samba shares
Create the Directory
As you see on my Share01 above, the path is /shares/share01. But, the actual directory does not exist yet. We can create it now
#Create the directory sudo mkdir -p /shares/share01 #change the owner to sambausers sudo chown -R root:sambausers /shares/share01 #Give permission of the share sudo chmod 1770 /shares/share01
Now we can restart Samba
sudo systemctl restart smb
At this point, our Samba server is ready and we can access it from other computer.
Thanks for reading this how to install Samba on Arch Linux 2017. Please share this article if you think its useful.