Sunday, 30 September 2012

Mounting Windows Share Folder on Linux

Method 1:

Install the samba client
   #yum install samba-client

Install the CIFS-Utils
   #yum install cifs-utils

Create  a directory that the share will mount to
   #mkdir /mnt/[shared_folder_name]

Open the NFS share file
   #vi /etc/fstab 

Add this command line in /etc/fstab file
   [windows_IP]:/[shared_folder_name] /mnt/[shared_folder_name]   cifs   
   username=[windows_username],password=[windows_password] 0 0 

Remark:
cifs = filesystem type, a windows share on Linux is recognized as cifs

To remount all filesystem on the linux server
   #mount -a


Method 2: (For VMWare Mounting Windows Host Folder]

Open thw VMWare Machine Settings window. In the Options tab, make sure you enabled the Shared Folders.

Run the vmware mount client to check the name of the shared host folder.
   # /usr/bin/vmware-hgfsclient

Mount the host folder
   # mount -t vmhgfs .host:/[windows_shared_folder] /mnt/hgfs

[Permanent]
Add this command line in /etc/fstab file
   .host:/[shared_folder_name] /mnt/[shared_folder_name]   vmhgfs   default 0 0
   

No comments:

Post a Comment