FileSharing in Windows 7 and Ubuntu 12.04 (Precise Pangolin)

This brief tutorial shows you how to enable file sharing between Windows 7 and Ubuntu 12.04 easily. If you want to access Ubuntu files from Windows or vice versa, you may have to enable file sharing. When file sharing is enabled, you will be able to access, modify and delete files on either machine remotely. This is one good way to make sure that both your Windows and Ubuntu machines can communicate share documents.

In order for this to work both machines must be on the same sub-network (plugged into the same switch / router). If they’re not, it probably won’t work.


The first thing you’ll want to do is open Windows and search for ‘Manage Advanced Sharing’ then click on it to open.

Enhance your coding experience with this split keyboard that offers up to 9" of separation.




Next, click the options to turn on file and printer sharing and save the changes.




Next, type the commands below to find out your domain or workgroup name.

net config workstation




Take note of the workgroup name shown. This is the group that both machines must be a member of in order to enable proper file sharing.




Next, logon to Ubuntu and press Ctrl – Alt – T on your keyboard to open Terminal. When it opens, run the commands below to install Samba and other packages.

sudo apt-get install python-glade2 system-config-samba




After installing, launch Samba from Dash




Then select ‘Preferences –> Server Settings’ from the menu




And type the workgroup name to match that of your Windows machine and save.




Restart both machines and hopefully when you login you should be able to see each machine from either system.








Double click Windows shares from Ubuntu and enter your Windows’ username and password to access its content.




In order to access Ubuntu shares from Windows, you must run the commands below to add your account to Samba Database.

sudo smbpasswd -a <username>




To view Ubuntu shares, you must share them in Ubuntu. Click on Samba share button, then specify the folders you wish to share.




Then grant access to the user who should have access.





That’s it! Logon to Windows and try to access Ubuntu shares. They should open for you.


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Invest in some screen real estate with a new big screen, backlit monitor availabe in five different sizes and price points.

7 thoughts on “FileSharing in Windows 7 and Ubuntu 12.04 (Precise Pangolin)”

  1. For me, this works half way. I can now access the Ubuntu PC from Windows. I also see all Windows shares on Ubuntu, but cannot access them. I enter name, Domain, Password, and Ubuntu sends me right back to the login form. No message. What’s wrong? Thanks

  2. Windows drive inaccessible form either ubuntu or windows. Windows shows an error “logged on from temporary server, try logging in sometimes later.” Linux shows an error of “Cannot mount from location. Failed to retrieve shared list from server.”

  3. I can acess WINDOWS PC(only C drive not other disk i can acess) from UBUNTU, but can’t access UBUNTU from WINDOWS …
    can u please suggest me how to access ubuntu from windows

  4. Only worked 1/2 way for me.
    After the Linux command, I wasn’t sure if it ended properly. Next step was to install it on Dash, but SAMBA doesn’t appear on Dash. Tried re-booting, no help. Tried re-typing Linux command
    sudo apt-get install python-glade2 system-config-samba
    (Why is it listed twice above anyway, in 2 different screen shots?)

    Re-typing linux command above produces the following result:
    python-glade2 is already the newest version.
    system-config-samba is already the newest version.
    The following packages were automatically installed and are no longer required:
    linux-headers-3.2.0-41 linux-headers-3.2.0-41-generic
    Use ‘apt-get autoremove’ to remove them.
    0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.

    How do I get Samba on Dash? What did I do wrong? I am on Ubuntu 12.04

Leave a Reply

Your email address will not be published. Required fields are marked *