Thursday, August 6, 2009

Mounting Windows shared folder on linux

Mounting windows shared folder on linux is very easy provided you know the ip of the windows machine, the name of the folder that is being shared, the username and password of the windows machine. As far as I know, there are 2 ways you can mount your windows shared folder on your linux machine.

The first way:

For gnome user, type Ctrl+F2, and type smb://windows_machine_ip/shared_folder_name. For example, see below picture


You can access the folder from Places


The second way:

Using command line;

sudo mount -t cifs //windows_machine_ip/shared_folder_name /directory_to_mount -o username=username,password=userpassword

example for mounting a shared folder named MP3 on 192.168.1.110 using windows username usin and password 123456 to /home/user/mp3:

$ sudo mount -t cifs //192.168.1.110/MP3 /home/user/mp3 -o username=usin,password=123456

Your shared folder now can be accessed from /home/user/mp3


That's all friends :)