In this tutorial, we will learn how to mount a Windows partition on CentOS by using mount.cifs
[info_box]
Please ensure that you have configured a Windows share before continuing.
[/info_box]
The mount.cifs file is provided by the samba3-client package. This can be installed from the standard CentOS yum repository by running the following command:
yum install samba3-client
Once installed, you can mount a Windows SMB share on your CentOS server by running the following command:
SERVER_ADDRESS: Windows system’s IP address or hostname
SHARE_NAME: The name of the shared folder configured on the Windows system
USERNAME: Windows user that has access to this share
MOUNT_POINT: The local mount point on your CentOS server
mount.cifs //SERVER_ADDRESS/SHARE_NAME MOUNT_POINT -o user=USERNAME
Example 1: mount a Windows SMB share called “Downloads” from Windows server 192.168.10.118, using username share to local mount point /mnt:
mount.cifs //192.168.10.118/Downloads /mnt -o user=share
If you’re having trouble, ensure that your Windows server has TCP port 445 open, and that the Windows share is configured correctly.