Transferring and sharing files between Windows PC and Linux is not as hard as you may think. With a little knowledge, you can easily share your files between these two different operating systems. Here we are providing 5 different ways to do the same.
1. Through Network Folder Sharing
You can share your files between the Windows and Linux systems via network shares. Network shares are the folder available on a machine that can be accessed by the users on another machine. Setting network folders on Windows PC is quite easy. However, setting a Linux system needs some effort but its not impossible.
Here is how you can do this:
- First, Go to your Windows PC and right-click the network connection icon from the System tray.
- Now, select Open Network and Internet Settings option then click the Sharing options.
- Under the current profile, Enable network discovery
- Enable File and Printer sharing
- Hit the Save Changes button to confirm the settings.
- Now browse the folder that has files you want to share, Right-click the folder and select Properties and click Sharing option.
- Click Advanced Sharing and check the Share this folder box option.
- Click OK to confirm the changes
- Now go to Security under Properties option. Configure the permission box accordingly. Since Windows 10 already creates a group known as Authenticated users for remote access to your system, you don’t have to do many changes.
- Click OK after it’s done.
How to Access a Windows Shared folder In Linux?
You can always access the shared folder by enabling the permissions. If you want to access Windows share in your Linux machine then simply open the file browser and go to the Network option. Now, look for the Windows-hosted folder and then you can transfer your data.
2. Transfer data from Windows to Linux using SSH
Another option to share data between Windows and Linux is by enabling SSH on the Linux machine and then sharing files using the command line.
Here is How You can set up an SSH Server on your Linux PC:
First thing you need to do is to open a terminal and then update as well as upgrade the OS using below commands:
Sudo apt uupdat
Sudo apt upgrade
After this is done, install an SSH server on your device. We recommend using OpenSSH server for this purpose.
Sudo apt install openssh-server
Install the server and check if its working by issuing the following command :
Sudo service ssh status
For sharing data from Windows, you need to use an SSH client such as PuTTY. For this, download a PSCP tool on your Windows PC to run with SSH client PuTTY. You can download these tools from officialPuTTYwebsite.
Download and Install PuTTYand save PSCP in the root of C:\ drive. Alternatively, you can set it as an environment variable. You also have to confirm the IP address of the Linux machine. Check the below box
Once the connection is established, you can transfer the data between your Windows and Linux devices.
This is how you can share your data:
C:\pscp c:\some\path\to\a\file.txt [email protected]:\home\user\some\path\newname.txt
At the time of data transfer, you will be asked for a password on the Linux machine to complete the process.
Moreover, in the same SSS connection, you can also copy your data from a Linux machine to Windows by using the command mentioned below. This command will download the file you want in the current directory.
3. Transfer Files From Linux to Windows Using FTP
You can also use FTP or File Transfer Protocol along with SSH for transferring files between Linux and Windows.
There are basically two ways by which you can transfer files using the SecuredFile Transfer Protocol /SFTP. First is by typing commands and the other is transferring using a mouse-driven drag and drop. The later one is easier that typing commands.
Here is How You Can Do This:
- First, make sure the SSH server is running on Your Linux system.
- Install FTP apps with SFTP support. FileZilla is a good option to go with.
- Launch FileZilla and navigate to File > Site Manager. Then, create a new site and set Protocol to SFTP.
- Now, add the target IP address in Host and fill in the username and password. Also, set the Logon Type to Normal.
- After the connection is established, simply use the FTP interface and then you can drag and drop the files between the Windows and Linux systems.
4. Transfer Files Between Linux and Windows UsingSynching Programs
You can also share your files between the different machines using a file synching program. These use encrypted key mechanisms to manage the connection between the systems.
It is very simple to use. For using this, you have to install the application and create a key. Now, set it on the other PC to sync your data.
There are various file synching software available out of which the two good option is Resilio Sync and other is SyncThing.
Here is a little introduction to both the apps :
Resilio Sync: It is a great file synching software. It was earlier known as BitTorrent Sync. You can use Resilio sync across a number of platforms. It is available in both free and paid versions. While free version will work for two devices, you can go for the paid version for multiple devices and advanced options.
SyncThing: SyncThing is available for Linux, Windows, macOS, and Android platforms. It is almost similar to the Resilio Sync and is available for free.
5. Share files by mounting a VirtualBox Folder in Linux Machine
Generally, most of the people run Linux in a virtual machine rather than a separate machine.
The good thing is, you can share files using VirtualBoxby creating a virtual shared directory for data syncing.
It doesn’t matter you’re running Linux on Windows in a Virtual machine or otherwise, the VirtualBox is already set up in both cases.
- First, make sure that you’ve installed Guest Additions on your Virtual Machine.
- Go to the VirtualBox Manager and click on VM.
- Select Start > Headless Start and when the status shows the system is running, right-click the VM and navigate Settings > Shared Folders.
- Next, select Machine Folders and click ‘+’ on right. Then, browse the folders and find the directory you want to choose, set a name and hit OK.
If you want the share to be available whenever you run VM then use Auto-mount checkbox. Hit OK to confirm and then exit.