How to mount Windows shared folder to Linux via Samba

Assuming you have shared the windows folder to local nerwork.

To permanently mount Samba folder into Linux Machine located on the same network. You need:

1.Install CIFS drivers in Linux

sudo apt install -y cifs-utils

2. Creare mount point

sudo mkdir /media/samba

3. Add mount config to fstab

sudo nano /etc/fstab

Add this line to the fstab file:

//<ip addresss of windows machine>/<share name> /media/samba cifs user=<user>,pass=<password>,nofail 0 0

That’s it, not just mount it by running:

sudo mount -a

Leave a Reply

Your email address will not be published. Required fields are marked *