How would you like to quickly share your documents in Windows 7 or 8 from the command line and access them from Ubuntu? Well, this brief tutorial is going to show you how to do it. In Windows, you can share individual file and folder, or an entire library with other users on the same system or over the network.
Windows 8 makes it easy with home groups, which let you easily share content among all your networked devices. All Windows devices that are member of the home group will be able to view, access and manage content and libraries in the group.
This tutorial is not going to go into details about the advantages and disadvantages about sharing. What I am going to show you is how to easily share content like your Documents folder in Windows and access it from Ubuntu using the command line.
To shared content in Windows from the command line, you use the command net share.
To view information about shared resources on a Windows computer, you should use the command net view.net view
Now, to share your Documents folder in Windows 7 or 8, you run the commands below.net share Document=C:\Users\Username\Documents /remark:"My Documents"
The options in the command are:
- net share — command to share
- Document – Shared name ( name to use when accessing the share from a remote host)
- C:\path to folder — ( the path to the folder you wish to share)
- /remark – – the description of the share
Now that you’ve created the share, you must enable file sharing before users will be able to access it remotely.
To enable file sharing from the command line, run the commands below.
netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes
That’s it. You should be able to access the shared content remotely now. To access it from Ubuntu, run the commands below to install Samba. Samba lets you access Windows’ shares.sudo apt-get install samba
After install Samba, open Nautilus file manager and go to Files –> Connect to Server
Finally, type the hostname or IP address and shared folder name, then click Connect