Mounting Windows Shares in Ubuntu

Having an Ubuntu box running the FOG server gives me the opportunity to learn about Linux along the way while I carry on with my trial of the imaging server. I didn’t plan it this way but I am going to make the most of this prime opportunity.

There’s a lot I can do in Windows with my eyes closed but I’d have no idea how to do the same in Linux (without the help of Google of course). So what I want to do is document anything and everything I learn about Linux, however big or small. This also bodes well with my decision to take practical steps towards career progression – having Linux skills will do me good on my CV.

I’ve been tinkering with the FOG PXE menu and found myself wanting to share some files between Ubuntu and Windows 7 which gave birth to this post. These instructions do not cover how to create shared folders in Windows 7, instead I’m concentrating on the Linux side of things – how to mount an existing Windows 7 shared folder in Ubuntu 10.04.

A couple of steps here can be done outside the Terminal but there’s something about using the Terminal thats I find more satisfying than using the GUI.

OK, so here goes.

Launch the Terminal from the Applications | Accessories menu and follow these instructions:

sudo apt-get install smbfs

image

enter password

image

Enter y to continue

image

mkdir ~/Windows-Share-on-HP1

Note: this creates a folder in your home directory called “Windows-Share-on-HP1”. I named it as such to make it easier for me to identify where the shared folder is. You can change the name of this folder to suit your liking.

image

sudo gedit /etc/fstab

image

This will launch a text document in edit mode. Add the following line at the bottom of the file. Replace everything in capitals with your own details.

//WINDOWS_ IP/NAME_OF_SHARED_FOLDER /home/EMENEYE/WINDOWS-SHARE-ON-HP1 cifs uid=UBUNTU_USERNAME,user=WINDOWS_USERNAME,password=WINDOWS_PASSWORD 0 0

Save and close the document.

The folder should be mounted on your Desktop after a restart. To mount without having to restart launch Terminal and type “sudo mount –a”

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s