Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I develop web-apps using ubuntu (jaunty) but have a need to work on a site that must be hosted on windows. I've setup virtualbox with a winxp32 installation and shared the entire hard disk. My goal is to be able to use eclipse(pdt) in ubuntu to create a new php project that references my wwwroot folder of the winxp installation.

I've got everything setup so I can browse the VM via smb://192.168.../www/ with no problem. However, I'm stumped when it comes to setting up the project in eclipse since it's outside of the normal workspace. I tried tinkering with creating a symbolic link in the workspace to my share but I'm not sure how to do that.

I've tried to create a symlink to the share but ubuntu says it's broken

ln -s smb://192.../www/ windows

I've read that I need to mount the shared drive first then symlink that but don't have any experience with that.

share|improve this question

2 Answers 2

up vote 7 down vote accepted

You can't symlink a network share like that. Symlinks only work between files/directories on the same computer (and hardlinks are even more restrictive - they need to be on the same filesystem/partition).

First make sure the smbfs package is installed on Linux:

sudo apt-get install smbfs

Or in >14.04:

sudo apt-get install cifs-utils

Now create a share on the Windows machine. Call it "www" or something.

Now make a directory on Linux, let's say it's called "windows".

Now mount the Windows share on Linux:

sudo mount -t smbfs 192.168.x.x/www windows

Or try "cifs" instead of "smbfs" if something is not right.

At this point, everything you see in the "windows" directory is the stuff actually on the "www" share on Windows. You can symlink the "windows" directory if you wish (but you could create it directly in the place you want it so no symlink is required):

ln -s windows /some/arbitrary/destination

Finally, read this:

# MountWindowsSharesPermanently

share|improve this answer
Thanks Florin. I had to tweak the mount command and add // in front of the IP, after that it worked like a charm. Much thanks. – Mike B Oct 29 '09 at 17:57
i think you actually want mount -t cifs if it's available. smbfs is a good fallback but i think cifs is generally the preferred of the two. – quack quixote Nov 2 '09 at 3:33
You may have to run mount.cifs instead of mount -t cifs. – indiv Feb 8 '14 at 1:41

One quick solution is to access the share with nautilus (going to Network or manually entering smb://...). After the share is accessed recent versions of ubuntu automatically mount the file share in the directory ~/.gvfs. This is a regular file system directory that can be soft-linked using ln -s.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.