All HowTo's Linux Ubuntu, Mint & Debian Linux

How to Mount a Windows share from Linux

This article demonstrates how to mount a windows CIFS/SMB share from a Linux host.

TIP: You should test that your mount configuration works before rebooting. If you reboot with a bad mount configuration, the Linux server may not boot back up as normal.

TIP2: You can (and possibly should) put your password in a separate file to limit it’s visibility.

Install the required package and make the directory/mount-point:

yum install samba-client
mkdir /media/windows

Add the following to your “/etc/fstab” file for mounting to happen on boot. Remember to test it first.

//windows.local/share /media/windows  cifs  username=myuser,password=mypass 0 0

Having made the changes above, try it out before rebooting. Do so with the following command:

mount /media/windows

Then check with “mount” or “df -h” that you have your new mount point.

Leave a Reply

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