How to mount a Windows SMB share on CentOS Linux

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.

Video Demonstration for How to mount a Windows SMB share on CentOS Linux

Scan to Donate Bitcoin
Like this? Donate Bitcoin to at:
Bitcoin 14M4a7UHEX61VoHkyjj4dxbUBNGGz3hmhM
Donate
Share This Post

About Author: Curtis K

Hi! My name is Curtis, and I am the creator of CentOS Blog. Please feel free to comment any suggestions, feedback or questions on my posts!

  • fajri abdillah

    Thanks, really helpful.

  • Clayton Cramer

    yum install samba3-client responds “No package samba3-client available.”