We often copy files from one location to another on the same system. But sometimes you may need to copy files from Linux to Windows. In this article, we will learn how to copy files from Linux to Windows. You can also use these steps to copy folders across systems with different OS. We will also learn how to copy files from Windows to Linux.
Here are the steps to copy files from Ubuntu Linux to Windows.
First we need to update Linux system. Open terminal and run the following command for this purpose.
class="wp-block-preformatted">$ sudo apt update
Most Linux systems have SSH server pre-installed. If that is not the case with you, run the following command to install SSH server.
$ sudo apt install openssh-server
If you see any prompts during installation, just enter ‘y’ to proceed further.
After SSH server is installed, you can check its status with the following command.
$ sudo service ssh status
Samba is a Windows interoperability suite for Linux/Unix systems. It allows Linux/Unix systems to communicate with Windows systems easily. So we need to install this software before proceeding further. Run the following command for this purpose.
$ sudo apt install samba
You may be asked for sudo or account password to begin installation, enter it to proceed further. If you see any prompts during installation enter ‘y’ to proceed.
Once you have installed Samba software on your system, you need to create a user for this software, using usermod command. You need to also enter the password. Here is the command to create a test user ‘test’ and set its password.
$ sudo useradd –M –N –g sambashare test $ sudo smbpasswd –a test
Next, you need to find the IP address of Windows system. Open command prompt on your Windows system and run ifconfig command to get its IP address.
$ ifconfig
The above command will show a lot of different information. The first adapter WLAN setting will display IP address.
Next, within Local Disk folder (C:) you need to create a new folder ‘Share’. Next we need to update the privileges of this folder to allow remote access. To do this, right click the folder, and hover ‘Give Access to’. It will expand to show you a menu. Click ‘Specific people …’ as shown below.
It will open a window with a list of available users. Select the user ‘Everyone’ to give remote access. Select ‘Read/Write’ option from dropdown under Permission Level and click Share button.
Now this folder is shared and remote users can access it. Click Done to close the window.
Open File Explorer in Ubuntu, click ‘Other Locations’, check ‘Connect to Server’ at the bottom. Enter the Samba URL to your Windows system in text bar and click Connect button. Here is the format of Samba URL.
$ Smb://ip-address-of-windows/foldername
Here is a sample screenshot for your reference.
You will see a dialog box asking for your Samba username and password. Enter them and click Connect button.
You will see Share folder’s contents in File Explorer. You can right click them and click Copy to copy them.
If you want to copy files & folders from Linux to Windows you need to enable remote access to Linux folders. Create a new folder ‘Share’ in your Linux system. Right Click to see context menu and click ‘Properties’.
You will see a dialog box. Expand ‘Local Network Share’ and check ‘Share this folder’ option and ‘Allow others to create and delete’ option. Click Share button and close it.
You will see the share icon added to the folder’s icon.
To access this folder from Windows system, open run application in your Windows system. Enter the IP address of your Linux system as //ip-address and click Ok.
It will open the Share folder in Windows Network File Explorer.
In this article, we have learnt how to copy files from Windows to Linux and vice versa.
Also read:
How to Set Process Priority in Linux
How to Change Default MySQL Data Directory in Linux
How to Fix firewall-cmd command not found
How to Protect Hard and Soft Links in Linux
How to Run Shell Script on Another Server
The post How to Copy Files from Linux to Windows appeared first on Fedingo.
2024 was the GenAI year. With new and more performant LLMs and a higher number…
Canonical’s Kubernetes LTS (Long Term Support) will support FedRAMP compliance and receive at least 12…
Welcome to the Ubuntu Weekly Newsletter, Issue 878 for the week of February 2 –…
At Canonical, we firmly believe that delivering an outstanding, customer-centric support experience is impossible without…
I want to share how to install osTicket v1.14 for Ubuntu 20.04 server. osTicket written…
Now I want to share how to install WordPress on ubuntu 20.04 server. WordPress is…