How to mount windows shared network drive as linux directory

My development environment in office is CentOS and quite often I have to access a windows network share directory. I hate to open nautilus samba file system access every time to copy/paste into those directory. I can’t use my bash console to do that. After some googling, I mounted the windows network share folder to my /home/sajid/team_members directory with this command:

mount -t smbfs -o username=sajid,password=sajid  //fileserver/team_members /home/sajid/team_members

Here the username/password is my userid password to access the shared network drive, “//fileserver/team_members” is the location of the network directory.

Now that I could mount the network folder to my local drive, I wanted to automate this task every time I started my computer. So, I added this line to my /etc/fstab file.

//fileserver/team_members /home/sajid/team_members   smbfs username=sajid,password=sajid 0 0

So from now on, I can use the network drive just as my local filesystem. Now that I have it fixed, I have to be extra careful not to do rm -rf /home/sajid/team_members/.. 😉


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s