Copy Files From Windows To Linux Download

Previously we have shown you how to remotely connect to your Linux machine from a Windows ane (Click hither). Now, what if you demand to transfer some files betwixt your Windows and Linux systems?

Well, a USB drive comes handy for uncomplicated data transfers. For a large number of files at different times, you need another efficient method. Transferring your data betwixt Linux and Windows using your local network is the recommended selection. With an like shooting fish in a barrel and quick 1 time setup, you can share your files betwixt various machines.

File Sharing between Linux and Windows Systems

In this tutorial, nosotros shall walk you through sharing your files between Ubuntu and Windows machines over a local network, and we shall also show you how to transfer files betwixt Windows and Linux on the same PC.

Over the Network

Transferring files between Ubuntu and Windows tin be done in many means, but in this tutorial, nosotros are going to talk over the following pop methods:

  1. Transfer files between Ubuntu and Windows via the SSH.
  2. Transfer files between Ubuntu and Windows using Samba.
  3. Transfer files between Ubuntu and Windows using Shared Network Folders.

Method 1: Transfer Files Between Ubuntu And Windows Via SSH

In this method, yous need to install and enable SSH service on Ubuntu. Also, we demand an SSH client application on Windows. In this tutorial, we shall exist using Putty. Next, we are going to use the command line to share your files across the network.

Stride ane. Install the SSH package on Ubuntu using the next command.

                      sudo            apt            install            openssh-server        
Install The Open SSH Package On Ubuntu
Install The Open SSH Package On Ubuntu

Step 2. Later on installation finishes successfully, you can cheque the SSH service status using the following control.

sudo service ssh status

The output of the command should look like the beneath screenshot:

Check The SSH Service Status
Check The SSH Service Status

If the service is non running, you can apply the following command to start it:

sudo service ssh start

Besides, to enable the SSH service to offset every time your system starts up, y'all tin use the following command:

sudo service ssh enable

Step iii. Install the internet-tools package.

sudo apt install net-tools
Install net-tools Package
Install internet-tools packet

Step 4. Execute the next command to get your Ubuntu automobile IP.

ifconfig
Ubuntu Machine IP
Ubuntu Automobile IP

Pace 5. From your Windows automobile, we need an SSH customer (which is Putty) and a PSCP. PSCP is considered a secure re-create tool that is used alongside with Putty to transfer files securely over a network.

Y'all can download both (Putty and PSCP) from the Putty official website. (Click here.) Kindly note that Putty will need to be installed while the PSCP won't. Yous have to put the PSCP.exe in the "C:\" bulldoze to exist used, as you should see shortly.

Footstep 6. At present open the file explorer and use the next command to start transferring your files from your Windows auto to Ubuntu.

c:\pscp "C:\Ubuntu Tutorials\Windows Shared Folder\Windows Shared Folder.txt" hendadel@192.168.1.8:windowssharedfile.txt
Copy File From Windows To Ubuntu Via SSH
Copy File From Windows To Ubuntu Via SSH

Step 7. Next, you should enter your Ubuntu password.

Enter Your Ubuntu Password
Enter Your Ubuntu Countersign

Step viii. Later on inbound the password successfully, the command shall copy the text file from your Windows machine to your Ubuntu home. You can cheque your home directory now, and you should observe the file there.

Check The Copied File
Check The Copied File

Step 9. Now in case you need to transfer your files from Ubuntu car to Windows, open the file explorer from your Windows motorcar and use the side by side control. Be careful, and do non forget the dot at the end of the command.

c:\pscp hendadel@192.168.ane.8:ubuntushared .
Copy File From Ubuntu To Windows Via SSH
Copy File From Ubuntu To Windows Via SSH

By executing the previous control, you lot should enter the password of your Ubuntu car. Adjacent, the file gets transferred from Ubuntu to the Windows current directory.

File Copied Successfully
File Copied Successfully

Method ii: Transfer Files Via Samba

In this method, we are going to install the Samba parcel on Ubuntu. Moreover, use the Windows run application to connect to the Ubuntu shared directories.

Stride 1. Install the Samba package on Ubuntu using the following command.

sudo apt install samba
Install Samba Package On Ubuntu
Install Samba Bundle On Ubuntu

Step 2. You can set a countersign to the samba share equally follows.

sudo smbpasswd -a hendadel
Add A User For Samba Share
Add A User For Samba Share

where hendadel is an Ubuntu user that you shall use while accessing the Ubuntu shared directory.

Step iii. Permit's create a directory that is used for sharing your files.

mkdir /home/hendadel/UbuntuSharedDir
Create Directory For The Shared Data
Create Directory For The Shared Data

Step four. Using your favorite text editor, open up the samba configuration file.

sudo vi /etc/samba/smb.conf
Open Samba Configuration File
Open Samba Configuration File

Stride five. Add together the adjacent lines at the end of the samba configuration file.

[UbuntuSharedDir] path = /habitation/hendadel/UbuntuSharedDir available = yeah valid users = hendadel read only = no browsable = yes public = aye writable = yes

The samba configuration file should similar the below:

Edit Samba Configuration File
Edit Samba Configuration File

Save and get out the samba configuration file.

Step 6. Restart the samba service using the following command:

sudo service smbd restart
Restart Samba Service
Restart Samba Service

Stride 7. From the Windows machine, open the run application from the First menu and enter the Ubuntu car IP with the shared directory name as follows.

\ii.168.1.8\UbuntuSharedDir
Remote Access To Your Ubuntu
Remote Access To Your Ubuntu

Press the OK button to continue.

Step eight. A Windows Security message will announced, you should have to enter your samba username and password. So press the OK push to continue.

Authentication Required
Hallmark Required

Pace 9. Now you should have access to your Ubuntu shared directory, and yous tin transfer files.

Welcome To Your Ubuntu Shared Directory
Welcome To Your Ubuntu Shared Directory

Method three: Shared Network Folders

This is the easiest method amidst all. In this method, we share any binder from the Windows auto to be visible in the Ubuntu machine.

Pace i. From the Windows machine, right-click on the network connections icon in the right bottom of the taskbar.

Right Click On Network Connections
Right Click On Network Connections

Step 2. Choose the "Open Network & Internet Settings."

Open Network and Internet Settings.
Open Network and Net Settings.

Step 3. Side by side, cull "Sharing Options."

Open Sharing Options
Open Sharing Options

Step 4. Now from your current network profile, choose the following options:

  • Turn on network discovery.
  • Turn on file and printer sharing.
Choose Options And Save Changes
Choose Options And Save Changes

Don't forget to relieve your changes.

Pace v. Now open your file explorer and go to the directory that you demand to share. Right-click on the binder then select Properties.

Open Folder Properties
Open Binder Properties

Step 6. After opening the folder properties, let's choose the Sharing tab. Also, select the Advanced Sharing button.

Open Advanced Sharing
Open Avant-garde Sharing

Step 7. Marking "Share this folder" box.

Check The Share This Folder
Cheque The Share This Folder

In case y'all need to set permissions on the shared folder similar (Read, Write), you can select the permissions button and set your permissions.

Set Sharing Permissions
Fix Sharing Permissions

Press the OK button to go along.

Footstep viii. Now from the Ubuntu machine, open up the file browser.

From Your Ubuntu Open The File Browser
From Your Ubuntu Open The File Browser

Step 9. From the left console, cull "Other Locations."

Open Other Locations
Open Other Locations

Step 10. In the lesser bar, enter your Windows motorcar IP and path to the shared folder as follows:

smb://192.168.1.6/Windows Shared Folder
Connect To Windows Shared Folder
Connect To Windows Shared Folder

Then press the Connect push.

Pace eleven. An authentication message should announced. Enter your username and password. Printing the Connect button to go on.

Enter Your Windows Machine Username And Password
Enter Your Windows Automobile Username And Countersign

Step 12. Next, you should exist able to see your Windows shared folder. Now you tin can transfer files between the ii machines.

Welcome To Your Windows Shared Folder
Welcome To Your Windows Shared Folder

Transferring files betwixt Windows and Linux on the same machine

Previously, we looked at how we can share files between a Linux PC and a Windows PC over a network. Some of the utilities used included SSH, Samba, and Shared Network Folders. Here, nosotros will await at a relatively similar state of affairs only that this time around, it will be on the aforementioned machine.

Yous might be wondering why can't nosotros re-create files directly from a Linux partition to a Windows partition and Vice-versa? The simple answer is that; It will work for one simply doesn't piece of work for the other. Let's look at the reasons behind this.

Why information technology isn't easy

The NTFS partition format used by Windows doesn't support Linux file permissions. Therefore, we tin can't consider installing Linux on an NTFS partition other than the Ext4. On the other hand, Windows cannot read the Linux file system fifty-fifty though Linux systems can read an NTFS partition. In nigh cases, the Linux sectionalisation is not listed in the "This PC" section on Windows in a dual boot. Therefore, you can re-create a file from the Windows partition on Linux only non the vice-versa.

A uncomplicated solution

With the higher up information in mind, we need to find a way to favor both operating systems and wouldn't pose any data corruption issues. For example, if y'all delete or alter any file in the Windows segmentation while accessing it with Linux, there is a high probability that Windows might heighten some errors on kicking.

Since Linux can't run on an NTFS or FAT32 partition and Windows tin can't read a Linux file system, nosotros will need to configure a third partitioning that tin be accessed by both operating systems. This third partition volition contain commonly shared files between the two. Permit's call information technology the SharedPartition .

Nosotros tin employ other methods to share files, including external storage like USB or online storage like Google Drive and DropBox. Nevertheless, these are wearisome as one will require a reboot to switch from 1 OS to another while the other method is dependent on bandwidth.

Create a SharedPartition

Whether yous have an SSD or Hard drive, we will crave at least Four partitions:

  • Linux Segmentation
  • Windows Partition
  • A Bandy space
  • The SharedPartition (NTFS)

I believe you already have the first 3. To create the SharedPartition, you can safely bank check our mail service on 'Creating or resizing partitions in Linux.' Ensure you format it to NTFS. Additionally, you might need to sympathize the sectionalisation Table used on your Drives. That tin be GPT or MBR. Our post on 'Booting Linux or Windows from a USB drive' gives you a comprehensive guide on this. You volition too empathise the reward of one over the other.

Up to here, nosotros already have a SharedPartition that tin be accessed by both Operating Systems. Withal, we might need to perform some configurations similar Auto-mount on Linux and setting it as the default location for diverse files.

Configure Auto-Mount on Linux

We will need to execute several commands on the control-line. If yous are merely getting started with, don't panic. Delight copy and paste the commands as they are below. Our Linux distribution of choice in this post is Ubuntu 20.04 LTS.

Notation: Retrieve to replace the name SharedPartition with the characterization of your new sectionalisation in any of the commands.

Step 1. Install the ntfs-3g driver, which enables Linux to read and write NTFS partitions.

sudo apt install ntfs-3g
Install ntfs-3g
Install NTFS-3g

Step two. Create a directory where we will mount our new partitioning.

sudo mkdir /media/SharedPartition
Create Mount directory
Create Mountain directory

Step 3. Get the UUID (universally unique identifier) of the new SharedPartition with the command below.

sudo blkid

You should run into an output like this.

Know your UUID
Know your UUID

Copy the UUID of the SharedPartition. The UUID identifies the division in the /etc/fstab file.

Step 4. Since nosotros volition be editing the /etc/fstab file, create a backup with the control below.

sudo cp /etc/fstab /etc/fstab.backup

Step 5. Execute the control below to edit /etc/fstab using the nano editor.

sudo nano /etc/fstab

You should run into a window like the one beneath. Add the following line at the end just remember to replace the UUID with yours.

# SharedStorage UUID=66E53AEC54455DB2 /media/SharedPartition/ ntfs-3g motorcar,user,rw 0 0
Edit etc-fstab
Edit etc-fstab

After this stride, reboot your PC. Yous should now meet the SharedPartition mounted under the 'Other Locations' card.

SharedPartition
SharedPartition

Configure your Special Folders (Linux)

Special folders in Linux are those present on your Dwelling directory. They include Desktop, Documents, Videos, etc. Execute the below command to edit their paths.

sudo nano .config/user-dirs.dirs
Special Folders
Special Folders

Now, we need to edit the paths to point to our SharedPartition mounted in /media/SharedPartition. For example, for Downloads, we will add the path "/media/SharedPartition/Downloads" and delete the "$HOME/Downloads" path. After applying the changes, you should have something like to this:

Special Folders
Special Folders

Save your changes and shut the Nano editor.

Configure your Special Folders (Windows)

Footstep 1. Open up the File Explorer and type %userprofile% on the address bar. Striking enter.

User Profiles
User Profiles

Pace two. Select a folder, say Downloads, that you lot desire to access in both operating systems. Correct-click and select the properties pick.

Step 3. On the pop-upwardly window that opens, select the Location tab.

Location Tab
Location Tab

Y'all will see the default path to your Downloads location.

Stride 4. Click on the Motility button. That will open a window where you will select your new Downloads path. Navigate to your SharedPartition and choose the Downloads binder already created in Linux. Click on the Select Folder button.

Select Destination Folder
Select Destination Folder

Step 5. Click on the Apply button to gear up the changes.

Yous will see a pop-upward window prompting yous to move the content in the old folder to this new location. Click OK.

Apply Changes
Employ Changes

That'south it. Yous tin at present go on to do the aforementioned for the other Folders. Now, anything you relieve on these folders, eastward.g., Documents on Windows, will be accessible on Linux in the Documents directory.

Using another partition to share files between the two operating systems is the most reliable option since Windows cannot read the Linux file system without using tertiary-party software. With this method, you lot don't demand to have duplicate files. Both operating systems can read and write on the same partition.

DOWNLOAD HERE

Posted by: cummingsentwere.blogspot.com