Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How to Mount a Windows share from Linux  (Read 1371 times)

0 Members and 1 Guest are viewing this topic.

joseletk

  • Guest
How to Mount a Windows share from Linux
« 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.
=========================================================================