Upload Files From Windows to Ubuntu Server
Previously nosotros have shown you lot how to remotely connect to your Linux machine from a Windows ane (Click here). Now, what if you need to transfer some files betwixt your Windows and Linux systems?
Well, a USB drive comes handy for simple data transfers. For a large number of files at different times, you demand some other efficient method. Transferring your data between Linux and Windows using your local network is the recommended option. With an easy and quick ane fourth dimension setup, you can share your files between various machines.
File Sharing between Linux and Windows Systems
In this tutorial, we shall walk you through sharing your files between Ubuntu and Windows machines over a local network, and we shall also show you lot how to transfer files between Windows and Linux on the same PC.
Over the Network
Transferring files betwixt Ubuntu and Windows tin be done in many ways, but in this tutorial, we are going to discuss the following pop methods:
- Transfer files between Ubuntu and Windows via the SSH.
- Transfer files between Ubuntu and Windows using Samba.
- Transfer files between Ubuntu and Windows using Shared Network Folders.
Method 1: Transfer Files Between Ubuntu And Windows Via SSH
In this method, you need to install and enable SSH service on Ubuntu. Also, we need an SSH client application on Windows. In this tutorial, we shall exist using Putty. Next, we are going to use the control line to share your files across the network.
Step 1. Install the SSH parcel on Ubuntu using the adjacent command.
sudo apt install openssh-server
Step two. Subsequently installation finishes successfully, you lot can bank check the SSH service status using the post-obit command.
sudo service ssh status
The output of the command should look similar the below screenshot:
If the service is non running, you tin can utilise the post-obit control to kickoff it:
sudo service ssh start
Also, to enable the SSH service to first every time your arrangement starts up, you can utilize the following command:
sudo service ssh enable
Step 3. Install the net-tools package.
sudo apt install internet-tools
Step iv. Execute the next command to get your Ubuntu machine IP.
ifconfig
Footstep 5. From your Windows machine, nosotros need an SSH customer (which is Putty) and a PSCP. PSCP is considered a secure copy tool that is used alongside with Putty to transfer files securely over a network.
Y'all tin download both (Putty and PSCP) from the Putty official website. (Click here.) Kindly annotation that Putty will demand to be installed while the PSCP won't. You have to put the PSCP.exe in the "C:\" bulldoze to be used, as y'all should meet shortly.
Step half dozen. Now open up the file explorer and apply the next command to beginning transferring your files from your Windows machine to Ubuntu.
c:\pscp "C:\Ubuntu Tutorials\Windows Shared Folder\Windows Shared Folder.txt" hendadel@192.168.1.viii:windowssharedfile.txt
Step 7. Side by side, y'all should enter your Ubuntu countersign.
Pace 8. After entering the password successfully, the control shall copy the text file from your Windows machine to your Ubuntu home. You lot can check your dwelling house directory now, and you should find the file at that place.
Step ix. At present in case y'all need to transfer your files from Ubuntu machine to Windows, open the file explorer from your Windows machine and use the next command. Be careful, and do non forget the dot at the end of the command.
c:\pscp hendadel@192.168.one.8:ubuntushared .
By executing the previous control, you lot should enter the password of your Ubuntu machine. Adjacent, the file gets transferred from Ubuntu to the Windows current directory.
Method 2: Transfer Files Via Samba
In this method, nosotros are going to install the Samba bundle on Ubuntu. Moreover, apply the Windows run application to connect to the Ubuntu shared directories.
Step 1. Install the Samba parcel on Ubuntu using the following command.
sudo apt install samba
Step 2. Yous tin set a password to the samba share as follows.
sudo smbpasswd -a hendadel
where hendadel is an Ubuntu user that you lot shall use while accessing the Ubuntu shared directory.
Step 3. Permit'southward create a directory that is used for sharing your files.
mkdir /home/hendadel/UbuntuSharedDir
Footstep 4. Using your favorite text editor, open the samba configuration file.
sudo vi /etc/samba/smb.conf
Step five. Add the next lines at the end of the samba configuration file.
[UbuntuSharedDir] path = /home/hendadel/UbuntuSharedDir bachelor = aye valid users = hendadel read just = no browsable = yes public = yes writable = yes
The samba configuration file should like the below:
Relieve and leave the samba configuration file.
Step half dozen. Restart the samba service using the following command:
sudo service smbd restart
Step 7. From the Windows auto, open the run application from the Beginning carte and enter the Ubuntu machine IP with the shared directory name as follows.
\2.168.one.8\UbuntuSharedDir
Press the OK push button to proceed.
Stride viii. A Windows Security message volition appear, you should have to enter your samba username and password. And then press the OK push button to go on.
Step 9. Now you should take access to your Ubuntu shared directory, and yous tin transfer files.
Method 3: Shared Network Folders
This is the easiest method amidst all. In this method, we share any folder from the Windows machine to be visible in the Ubuntu machine.
Step 1. From the Windows automobile, right-click on the network connections icon in the correct lesser of the taskbar.
Stride two. Choose the "Open Network & Internet Settings."
Footstep 3. Next, cull "Sharing Options."
Step 4. Now from your current network profile, cull the post-obit options:
- Turn on network discovery.
- Turn on file and printer sharing.
Don't forget to salve your changes.
Step 5. At present open your file explorer and go to the directory that y'all demand to share. Right-click on the folder so select Properties.
Stride 6. Afterward opening the folder backdrop, let's choose the Sharing tab. Also, select the Advanced Sharing button.
Step 7. Mark "Share this binder" box.
In instance you demand to set permissions on the shared binder like (Read, Write), y'all can select the permissions button and set up your permissions.
Press the OK button to keep.
Step 8. Now from the Ubuntu machine, open the file browser.
Pace 9. From the left panel, choose "Other Locations."
Pace 10. In the bottom bar, enter your Windows machine IP and path to the shared folder as follows:
smb://192.168.1.vi/Windows Shared Folder
Then press the Connect button.
Footstep eleven. An authentication message should announced. Enter your username and password. Press the Connect button to proceed.
Step 12. Side by side, you should be able to see your Windows shared binder. At present you can transfer files between the two machines.
Transferring files between Windows and Linux on the same machine
Previously, we looked at how we tin 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, we volition look at a relatively similar situation simply that this time around, it will be on the same machine.
You might be wondering why tin't nosotros re-create files direct from a Linux partition to a Windows partition and Vice-versa? The simple respond is that; Information technology will work for one merely doesn't work for the other. Permit's look at the reasons backside this.
Why information technology isn't easy
The NTFS sectionalisation format used by Windows doesn't back up Linux file permissions. Therefore, we tin can't consider installing Linux on an NTFS segmentation other than the Ext4. On the other hand, Windows cannot read the Linux file system even though Linux systems tin can read an NTFS partition. In most cases, the Linux sectionalisation is not listed in the "This PC" section on Windows in a dual boot. Therefore, y'all can copy a file from the Windows partition on Linux simply not the vice-versa.
A simple solution
With the higher up information in mind, we need to discover a manner to favor both operating systems and wouldn't pose any data corruption issues. For instance, if you lot delete or alter whatsoever file in the Windows sectionalisation while accessing information technology with Linux, there is a high probability that Windows might enhance some errors on kick.
Since Linux can't run on an NTFS or FAT32 partition and Windows can't read a Linux file system, we volition demand to configure a third partition that can be accessed by both operating systems. This 3rd sectionalization will incorporate commonly shared files between the two. Allow's call information technology the SharedPartition .
We can employ other methods to share files, including external storage like USB or online storage like Google Drive and DropBox. However, these are tedious every bit one will require a reboot to switch from one OS to some other while the other method is dependent on bandwidth.
Create a SharedPartition
Whether you have an SSD or Hard drive, we will require at to the lowest degree Iv partitions:
- Linux Sectionalisation
- Windows Partition
- A SWAP space
- The SharedPartition (NTFS)
I believe you already accept the first three. To create the SharedPartition, you can safely check our mail on 'Creating or resizing partitions in Linux.' Ensure you format information technology to NTFS. Additionally, y'all might need to empathize the partition Table used on your Drives. That tin be GPT or MBR. Our post on 'Booting Linux or Windows from a USB drive' gives y'all a comprehensive guide on this. Yous volition likewise empathize the advantage of one over the other.
Up to here, we already have a SharedPartition that tin be accessed by both Operating Systems. Nevertheless, we might need to perform some configurations similar Automobile-mount on Linux and setting information technology as the default location for various files.
Configure Auto-Mount on Linux
We will demand to execute several commands on the command-line. If yous are just getting started with, don't panic. Please copy and paste the commands as they are below. Our Linux distribution of option in this post is Ubuntu xx.04 LTS.
Note: Think to replace the proper name SharedPartition with the label of your new sectionalisation in any of the commands.
Stride 1. Install the ntfs-3g driver, which enables Linux to read and write NTFS partitions.
sudo apt install ntfs-3g
Step two. Create a directory where we will mount our new partition.
sudo mkdir /media/SharedPartition
Stride 3. Get the UUID (universally unique identifier) of the new SharedPartition with the control below.
sudo blkid
You lot should see an output like this.
Copy the UUID of the SharedPartition. The UUID identifies the partition in the /etc/fstab file.
Step 4. Since we will be editing the /etc/fstab file, create a backup with the command beneath.
sudo cp /etc/fstab /etc/fstab.backup
Step 5. Execute the command below to edit /etc/fstab using the nano editor.
sudo nano /etc/fstab
You lot should see a window like the one below. Add the following line at the end only remember to supersede the UUID with yours.
# SharedStorage UUID=66E53AEC54455DB2 /media/SharedPartition/ ntfs-3g machine,user,rw 0 0
After this step, reboot your PC. Yous should at present meet the SharedPartition mounted under the 'Other Locations' bill of fare.
Configure your Special Folders (Linux)
Special folders in Linux are those present on your Home directory. They include Desktop, Documents, Videos, etc. Execute the below command to edit their paths.
sudo nano .config/user-dirs.dirs
At present, we need to edit the paths to point to our SharedPartition mounted in /media/SharedPartition. For instance, for Downloads, we will add the path "/media/SharedPartition/Downloads" and delete the "$Dwelling house/Downloads" path. After applying the changes, you should have something similar to this:
Salve your changes and close the Nano editor.
Configure your Special Folders (Windows)
Step 1. Open the File Explorer and type %userprofile% on the address bar. Hit enter.
Footstep 2. Select a folder, say Downloads, that you want to access in both operating systems. Right-click and select the properties option.
Step three. On the popular-up window that opens, select the Location tab.
You will see the default path to your Downloads location.
Pace iv. Click on the Move button. That will open a window where y'all will select your new Downloads path. Navigate to your SharedPartition and choose the Downloads folder already created in Linux. Click on the Select Folder button.
Step 5. Click on the Apply button to set the changes.
You will meet a pop-up window prompting you lot to movement the content in the former folder to this new location. Click OK.
That's it. You can now proceed to practise the same for the other Folders. Now, anything you lot save on these folders, e.g., Documents on Windows, will be accessible on Linux in the Documents directory.
Using some other division to share files betwixt the two operating systems is the most reliable option since Windows cannot read the Linux file system without using 3rd-party software. With this method, you don't need to have duplicate files. Both operating systems tin can read and write on the same partition.
schmidtnurreacuot.blogspot.com
Source: https://www.fosslinux.com/19265/how-to-share-and-transfer-files-between-linux-and-windows.htm
Post a Comment for "Upload Files From Windows to Ubuntu Server"