Windows 7 uses a feature called Homegroup, which enhances the Workgroup feature in order to make home networking easier for all Windows 7 computers. However, this feature doesn't work on Linux or older versions of Windows. In order to connect your Linux computers to Windows 7 computers and share files and folders, you need to make a series of settings. The first setting is to enable file sharing. Then, you need to change the Workgroup, so that all computers belong to one Workgroup. In this tutorial I will demonstrate how to enable file sharing and then how to configure and change the Workgroup on an Ubuntu PC.
NOTE: Article updated to work with Ubuntu 10.10 & 11.04.
The sharing service or Samba as it is called in Ubuntu is not installed by default. The installation process of Samba varies in complexity depending on the method you will be using. I will show you the most easy and straightforward method to install Samba.
First, in Ubuntu, open the Home Folder, located in the Places menu.

Next, right-click on any folder from this window to open a contextual menu. From the contextual menu, click on Sharing Options.

This opens the Folder Sharing window. Check the box next to ’Share this folder’.

A warning window will pop-up stating that the sharing service is not installed. Click on the Install service button.

Note: If you do not receive this warning, it means that the sharing service is already installed and you should be able to share files and folders. To change the Workgroup, follow the instructions found in the next section.
Then type your user account password and click on OK. The installation process will begin.

In a few seconds, you will be notified that all changes have been successfully applied. Click Close and Ubuntu will ask to restart your session.

Save any open files you might have and click Restart session. After the restart, the sharing service is installed and fully functioning.

In most cases you won’t have to change the Workgroup name because, by default, Ubuntu, Windows and Mac OS X have the same Workgroup name, which is actually “workgroup”. However, if you have to change it follow the steps detailed in this section.
Open a Terminal window and type the following command: sudo gedit /etc/samba/smb.conf.
Then, press Enter. If you haven’t previously used the Terminal this session, Ubuntu will ask you to type in your user account password.

Next, the Samba configuration file will open in a gedit window. Scroll down, if necessary, until you find the workgroup line, in the Global Settings section.

Edit the Workgroup name so that it will match the name of the Workgroup you want to add your Ubuntu computer to.
Click on Save and restart Ubuntu so that the new settings get applied.

NOTE: If you have a network which includes Windows computers, you need to make sure the Workgroup is setup the same as on your Ubuntu computers. To learn how to do this, check out this tutorial: How to Change the Workgroup in Windows 7.
You can enable sharing in Ubuntu (or any Linux PC) and configure it to join a Windows Workgroup in order to be visible on the same network and share files, folders, and printers. If you want to know more about setting up other PC's on a local network, or how to further utilize the networking features between Linux and Windows 7, check out the articles listed below.
How to Access Windows 7 Shared Folders from Ubuntu
How to Share Folders in Ubuntu & Access them from Windows 7
Mount Windows 7 Shared Partitions & Folders in Ubuntu
How to Change the Workgroup in Windows 7
How to Customize Network Sharing Settings in Windows 7
Share Libraries or Folders Using the Sharing Wizard
Comments
As a newbie, I was really
As a newbie, I was really hoping this was the "holy grail" I was looking for. I'm simply trying to get a new Ubuntu box (Lucid) to "act like" one of the Windows 7 machines on the same (wireless) network.
All went well until:
sudo service samba restartThat simply returns, "samba: Unrecognized service"
Then, I read somewhere else that the command is different for Lucid, so I did:
sudo service smdb restartAnd that worked perfectly!
However, still no joy - The machine is not visible to the Windows 7 computers, and it can't "see" them, either, and I have no idea what to do next!?
I've found dozens (hundreds?) of online posts about setting-up Samba on Ubuntu, and I'm discouraged in that no two are the same, bot one has been thorough, and not one has worked!?
it's sudo service smbd
it's sudo service smbd restart
not smdb
thank you .very much.the
thank you .very much.the process is running now..so wt further i have to do?
please kindly reply
Alas, another careless,
Alas, another careless, inaccurate, incomplete set of instructions that don't work even after commenters correct what the author should have known before sitting down to write. Wish I had something constructive to say. Like Tom, I'm all too familiar with this outcome.
These instructions don't work
These instructions don't work with the latest version of Ubuntu. The tutorial was made using an older version of this operating system. We are working as we speak on an update to the article which will be published in the next week or so. The new instruction set WILL WORK with Ubuntu 10.10.
Many thanks, and my apologies
Many thanks, and my apologies for my late-night snarkiness! Working on a Masters and taking it out on you when I ended up emailing myself .5G of files cos I couldn't figure it out for myself as I usually do.
The article is now updated to
The article is now updated to work with Ubuntu 10.10. Please test and confirm if it works for you too.
Thanks for the update and
Thanks for the update and your help. It still does not work for me. My Windows 7 computer and the Ubuntu 10.04 LTS box are both displaying the correct workgroup name, but the Windows 7 machine is connecting via "Homegroup" and can not see Ubuntu. It sees the other Win7 machine, of course.
Ironically I was separated from my Ubuntu for a few days, through no desire of my own. I suspect I can figure this out this weekend. I thought I should mention it.
This is a fine site and your attention to updates and accuracy here is to be commended.
You cannot see the Ubuntu
You cannot see the Ubuntu computer in the Homegroup. You need to open Windows Explorer and go to Network. There you will see the Ubuntu computer.
The Homegroup is made to work only with Windows 7 computers. To learn more about it and truly understand how it works, please read this tutorial The HomeGroup Feature & How it Works.
While it's true that's the
While it's true that's the way it's *supposed" to work, it often does not.
Set-up identically, I have one Ubuntu box that never appears on the Windows 7 machines, and another box that intermittently "appears" and "disappears."
Again - The two Ubuntu boxes are (to the best of my ability) configured identically.
It's unclear (to me) if this is a real "bug" in Ubuntu, or just another unnecessarily obscure configuration "quirk" (usability bug), but it is real.
Worth mentioning - All eight machines on this network are WiFi.
This guide worked perfectly
This guide worked perfectly on my Ubuntu 11.04. Thanks a lot!
This didn't work for me. My
This didn't work for me. My W7 machine cannot "see" the ubuntu 11.04 box at all
Double check that the Windows
Double check that the Windows 7 computer has the same Workgroup setup as your Ubuntu one.
I followed all the steps but
I followed all the steps but still i have the windows workgroup with the other pcs and a separate one called "WORKGROUP" with the ubuntu pc.
i can view the pcs from the windows group and can access the ubuntu pc from the windows, they are just in separete workgroups.
Any advice? thank you in advance.
Did I understand correctly
Did I understand correctly that the Windows computers have the workgroup "workgroup", in lower case while the Ubuntu computer has the workgroup "WORKGROUP", written in upper-case?
If my understanding is correct then you don't need to worry. All is fine. It is not case sensitive.
if you are getting errors
if you are getting errors after clicking "Install Service", try a "sudo apt-get update" before it.
http://www.liberiangeek.net
http://www.liberiangeek.net/2011/04/share-files-folders-ubuntu-11-04-nat...
I followed all directions on this tutorial and nothing worked, still could not see each other. So i tried again today not giving up and found the link above, you have to install Samba directly from software center. the directions given here for installing samba are apparently incorrect or outdated. However i would try the steps on this tutorial and the one above i have the link to. Both machines see each other and i can share folders. I just have to work out some things on windows 7 now to allow my Ubuntu machine to access files on it. I think its my firewall or i need to allow everyone to access the folders etc.
Add new comment