Categories: TutorialsUbuntu

How to Copy Files from Linux to Windows

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.

How to Copy Files from Linux to Windows

Here are the steps to copy files from Ubuntu Linux to Windows.

1. Update System

First we need to update Linux system. Open terminal and run the following command for this purpose.

$ sudo apt update

2. Install SSH Server

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

3. Install Samba

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.

4. Create Samba User

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

5. Find IP Address of Windows

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.

5. Create Windows Folder

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.

6. Access Shared Folder from Ubuntu

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.

7. Copy Files from Linux to Windows

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.

Ubuntu Server Admin

Recent Posts

A year of documentation-driven development

For many software teams, documentation is written after features are built and design decisions have…

9 hours ago

Announcing FIPS 140-3 for Ubuntu Core22

With the release of the FIPS 140-3 certified cryptographic modules for Ubuntu 22.04 LTS, Canonical…

1 day ago

The foundations of software: open source libraries and their maintainers

Open source libraries are repositories of code that developers can use and, depending on the…

4 days ago

From inspiration to impact: design students from Regent’s University London explore open design for their dissertation projects

Last year, we had the opportunity to speak at Regent’s UX Conference (Regent’s University London’s…

5 days ago

When an upstream change broke smartcard FIPS authentication – and how we fixed it

A government agency mandated smartcard authentication across their Ubuntu fleet. When they enabled FIPS mode…

6 days ago

Open platforms, edge AI, and sovereign telco clouds: Ecrio & Canonical at MWC Barcelona

Building telco clouds with open source At MWC Barcelona 2026, Canonical is demonstrating how telecommunications…

6 days ago