Sharing files between two Windows or two Linux computers is straightforward. However, things get a bit more complex when sharing between a Windows and a Linux computer. Nevertheless, it will be much easier after you follow the steps we outline below.
How to share files between Windows and Linux computers
Setting Up on Windows Computer
First, you need to ensure that network settings allow your Windows computer to connect to other computers. Open Network and Sharing Center.
Next, select Change advanced sharing settings.
Check the boxes for Turn on network discovery and Turn on file and printer sharing as shown in the image below.
Completing the 'open' network connection will be when you navigate to the folder to share. Assuming I have a folder called Share, next I select Properties then switch to the Sharing tab, and choose Advanced Sharing.
Check the option
After the Permissions window opens, check full control in the Permission for Everyone box and then click OK.
Finally, switch to the Security tab and add permissions for the Linux machine account. Remember, at this point, the Linux and Windows machines must be connected to the same network for the user name to be displayed.
Essentially, the steps for sharing above are no different from when you create a sharing connection between 2 Windows machines.
Setting Up on Linux Computer
First, you need to install the cifs-utils package to enable sharing.
sudo apt-get install cifs-utils |
Next, use the command below to identify the shared folder from Windows.
mkdir ~/Desktop/Windows-Share |
sudo mount.cifs //WindowsPC/Share /home/geek/Desktop/Windows-Share -o user=geek |
Meaning of the above command:
- sudo mount.cifs: Sets up mounting of the shared folder
- WindowsPC: Windows computer name (Different for each machine)
- Windows-Share: This is the path to the shared folder on Windows (Varies by machine)
- /home/geek/Desktop/Windows-Share: This is the path to the folder you create on Linux. It signifies linking to the shared folder on Windows
- user=geek: Linux username on the sharing Windows machine (Actually the name of the account you are using on Linux)
Then, you enter the password for the current Linux account to succeed.
Those are all the steps to share files between 2 Windows and Linux computers, in this case, where the Windows machine shares and the Linux machine receives the share. In reality, the sharing process on Windows is exactly the same as what you normally do, just pay attention to a few extra steps on Linux and you're done. We also have an article on the most popular Linux operating systems. If you're thinking of using Linux, you should check it out.
Thank you.