Howto Access / Mount / MAP Windows Share from Linux | RHEL / CentOS 5.x | RHEL / CentOS 6.x | Fedora 17 | Ubuntu 12.10 | Ubuntu 12.04 LTS


This Article will show you to Access Windows Shares from Linux. You can Perform this commands to Almost all Linux like ( Red Hat Enterprise Linux, Ubuntu Desktop Edition, Ubuntu Server Edition, CentOS and Of Course Fedora).

This is very basic Howto but this can be very helpful and You can achive this with some simple steps.

Accessing Windows share is called a Mount in Linux Terms. In This Howto and in Section 2 You will able to make that share Permanent available to Linux it is like MAP Drive of Windows from Linux.

Requirements for this Howto :

1. You need to be root to execute this commands, To Access from GUI “root” access is not needed.

2. Package cifs-utils must installed, If its not installed You can Install it by following command

=> For Ubuntu

#sudo apt-get install cifs-utils

=> For RHEL/CentOS

#yum install cifs-utils

Please Perform following steps to Map / Mount / Access windows share directory from Linux

Following topics covered in this article :-

1) Mount Windows Share from Linux ( Temporary ).

2) Mount Windows Share from Linux ( Permanent, Available on re-boot).

3) Accessing Windows Share Directory using Linux GUI.

So Now Let’s Come to the poing and Start Executing Commands

1) Mount Windows Share from Linux ( Temporary ) :-

By Performing this Section you will able to mount windows shared directory from Linux but that will be on Temporary basis once you re-boot your system then it will not available. So Take a note of this.

root@tejasbarot-linux-ahmedabad:~ # mount -t cifs //<windows-ip-address>/<share-name> /<local/mount/point> -o username=username,password=password

For Example :-

root@tejasbarot-linux-ahmedabad:~ # mount -t cifs // /mnt -o username=tejasbarot,password=linuxahmedabad

2) Mount Windows Share from Linux ( Permanent, Available on re-boot).

By Performing this Section you will able to mount windows shared directory from Linux on Permanent Basis, Even if you re-boot then it will be available, But Of-Course Windows share must available.

First of all take backup of /etc/fstab file so if anything goes wrong you can always recover.

=>  To backup /etc/fstab file execute following command.

root@tejasbarot-linux-ahmedabad:~ #cp /etc/fstab /etc/fstab.original

=> Open /etc/fstab with your Favourite text editor. I am using VIM as my editor.

root@tejasbarot-linux-ahmedabad:~ # vim /etc/fstab

=> Now Insert Following entry

//<windows-ip-address>/<share-name> /<local/mount/point> cifs username=username,password=password 0 0

For Example ( Entry Should look like below ) :-

// /mnt cifs username=tejasbarot,password=linuxahmedabad 0 0

Save and Exit from File. To save in VIM ( Press ESC and :wq and ENTER )

=> To Test Your Entry is correct or not Execute following command :-

root@tejasbarot-linux-ahmedabad:~ # mount -a

No Error should be there once you execute this command.

=> Now You can Confirm by “df -h”

3) Accessing Windows Share Directory using Linux GUI.

This is the easiest way to Access Windows Share from Linux.

If You are Using Unity or GNOME 3.0 then you can search for “Connect to Network/Server” and Window will open and If You are using GNOME Classic then You can Perform steps as per below screen shot.

=> Click on “Places” -> Click on “Connect to Network/Server

Connect to Network/Server
Connect to Network/Server


=> Select “Windows Share when Next Screen Appears

Select Windows Share
Select Windows Share

=> When Next Screen Comes up,Provide Details of “Windows Share” and click on Connect.

  • Server : IP Address/Name of System where windows share is available (Only this field is required, You can skip all other fields).
  • Port : Provide If only connecting to Non-Default Port.
  • Type: Windows Share
  • Share : Share Name
  • Folder : Folder Inside Share
  • Domain Name : If You are in Domain Environment then Provide Domain Name.
  • Username : Username Who has Share Access
  • Password : Password of User which you have provided above.
Provide Share Details
Provide Share Details

That’s It. By above three methods you can Map / Access / Mount Windows Share from Linux and You can even Make it Permanent same like MAP Drive.

Hope this will helps you, Waiting for your feedback.

If you like this then Please Click Google +1 Button and Show Your Support. Your Support will encourage me to write more articles.

All Linux User’s Blog Mobile Applications :-

Enjoy Windows Share from Linux 🙂 Enjoy Linux MAP Drive 🙂 Enjoy Linux 🙂 Enjoy Open Source 🙂