Mount a SAMBA share and create symbolic link
Solution 1:
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
Solution 2:
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
.