I work in a shared Linux – Window environment and sharing files between computers has always been somewhat cumbersome. Most of the time I was able to access files in a shared folder on the Window machine from my Linux computer. But I never got it to work the other way around. The Windows computer simply did not see the shared folders on my Linux computer.
There are numerous blogs, email threads and forum articles dealing with similar problems. Solutions, if any, often involved tweaking Samba configuration. Alas, none ever worked for me.
And then I came across this observation in an email thread on Ubuntuforums that “a computer name in excess of 15 characters becomes invisible on the network”. Sure enough, my computer name was longer than 15 characters.
Could the solution really be that simple!? Yes, it was that simple! After changing my computer name it immediately was visible in Networks on the Window computer!
If you have similar problems with your Windows computer not seeing your shared folders on your Linux computer, you may first want to check the length of your computer name before diving into more complicated solutions. You can see your current hostname by opening a terminal and typing on the command line:
If the name turns out to be longer than 15 characters, you can change it temporary by typing on the command line:
sudo hostname NEW_HOSTNAME_HERE
This will change the hostname until next reboot. To change the name permanently, you need to edit the host files. You can do this by running
sudo gedit /etc/hostname sudo gedit /etc/hosts
Instead of using gedit, you can of course use your favourite text editor. In both files, change the name to what you want and save them. You need to restart the computer to apply the change.