Admin-Ahead Community

Linux => General Linux => Topic started by: joseletk on April 21, 2018, 11:51:53 am

Title: How to Mount a Windows share from Linux
Post by: joseletk on April 21, 2018, 11:51:53 am
This article demonstrates how to mount a windows CIFS/SMB share from a Linux host.

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.

 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:

Code: [Select]
# 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.

Code: [Select]
//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:

Code: [Select]
# mount /media/windows
Then check with “mount” or “df -h” that you have your new mount point.
=========================================================================