Monday, November 3, 2008

Simple way to mount a Windows share in Linux

The following command mounts a Windows Share in Linux.

sudo mount -t cifs "//10.0.0.3/Share_Name" "/mnt/folder_name" -o username=workgroup/user_name,password=xxxxxx

"//10.0.0.3/Share_Name" -> Ip address of the windows machine + Share Name
"/mnt/folder_name" - > Folder in linux where the share has to be mounted
username=workgroup/user_name,password=xxxxxx -> Specify the workgroup, username & password for the Windows machine

Note : 
1. 'smbfs' package should be installed in the Linux machine for mounting the Windows share
2. Unmount the share using the following command,
    sudo umount /mnt/folder_name

No comments: