Ubuntu copy file to windows

I am running a putty client on a Windows machine to connect successfully to a Linux box. Now I want to be able to copy a file from the Linux machine under the path /home/ubuntu/myfile to C:/Users/Anshul/Desktop on my local computer. The user at the Windows machine is anshul. I am giving the following command on putty but it is not working:

scp /home/ubuntu/myfile ip_address_of_windows_machine:C:/Users/Anshul/Desktop 

I think the path for the Windows machine is wrong. Please help as I have banged my head on a large number of forums but none seem to give correct path for Windows server. Don’t suggest alternate options like WinScp

Guy Avraham's user avatar

Guy Avraham

3,4923 gold badges38 silver badges50 bronze badges

asked Apr 19, 2012 at 19:56

user1344963's user avatar

5

This one worked for me.

scp /home/ubuntu/myfile username@IP_of_windows_machine:/C:/Users/Anshul/Desktop 

answered Mar 12, 2018 at 6:04

emoblazz's user avatar

emoblazzemoblazz

1,4111 gold badge7 silver badges3 bronze badges

6

Download pscp from Putty download page, then use it from Windows Command Line CMD as follows:

pscp username_linux_machine@ip_of_linux_machine:/home/ubuntu/myfile.ext C:\Users\Name\Downloads

Copying starts once you enter the password for the Linux machine.

ifnotak's user avatar

ifnotak

4,1973 gold badges22 silver badges36 bronze badges

answered Jun 8, 2016 at 20:49

Hesham Eraqi's user avatar

Hesham EraqiHesham Eraqi

2,4524 gold badges23 silver badges45 bronze badges

4

Try this, it really works.

$ scp username@from_host_ip:/home/ubuntu/myfile /cygdrive/c/Users/Anshul/Desktop

And for copying all files

$ scp -r username@from_host_ip:/home/ubuntu/ *. * /cygdrive/c/Users/Anshul/Desktop

fluffyBatman's user avatar

fluffyBatman

6,5443 gold badges24 silver badges25 bronze badges

answered Jun 10, 2014 at 11:57

Chris Alexander sebastian's user avatar

8

Access from Windows by Git Bash console (also works for CMD and PowerShell):

scp user@ip:/dir1/dir2/file "D:\dir1\dir2"

Wenfang Du's user avatar

Wenfang Du

9,02412 gold badges60 silver badges92 bronze badges

answered Jan 4, 2019 at 13:18

byteprom's user avatar

byteprombyteprom

5514 silver badges4 bronze badges

5

You could use something like the following

scp -r linux_username@linux_address:path/to/file path/to/local/directory

This will copy file to the specified local directory on the system you are currently working on.

The -r flag tells scp to recursively copy if the remote file is a directory.

answered Feb 16, 2015 at 23:58

Atif's user avatar

AtifAtif

3451 gold badge4 silver badges16 bronze badges

Windows doesn’t support SSH/SCP/SFTP natively. Are you running an SSH server application on that Windows server? If so, one of the configuration options is probably where the root is, and you would specify paths relative to that root. In any case, check the documentation for the SSH server application you are running in Windows.

Alternatively, use smbclient to push the file to a Windows share.

George's user avatar

George

6,9063 gold badges44 silver badges56 bronze badges

answered Apr 19, 2012 at 19:59

theglauber's user avatar

theglaubertheglauber

28.4k7 gold badges29 silver badges47 bronze badges

5

For all, who has installed GiT completly with «Git Bash»: You can just write:

scp login@ip_addres:/location/to/folders/file.tar .

(with space and DOT at the end to copy to current location). Than just add certificate (y), write password and that’s all.

answered Oct 3, 2017 at 12:31

Krzysztof Walczewski's user avatar

1

Your code isn’t working because c:/ or d:/ is totally wrong for linux just use /mnt/c or/mnt/c

From your local windows10-ubuntu bash use this command:

for download:
(from your remote server folder to d:/ubuntu) :

scp username@ipaddress:/folder/file.txt /mnt/d/ubuntu

Then type your remote server password if there is need.

for upload:
(from d:/ubuntu to remote server ) :

scp /mnt/d/ubuntu/file.txt username@ipaddress:/folder/file.txt 

Then type your remote server password if there is need.
note: I tested and it worked.

answered Feb 19, 2019 at 12:09

Baris Vvolf's user avatar

I had to use pscp like above Hesham’s post once I downloaded and installed putty. I did it to Windows from Linux on Windows so I entered the following:

c:\ssl>pscp username@linuxserver:keenan/ssl/* .

This will copy everything in the keenan/ssl folder to the local folder (.) you performed this command from (c:\ssl). The keenan/ssl will specify the home folder of the username user, for example the full path would be /home/username/keenan/ssl. You can specify a different folder using a forward slash (/), such as

c:\ssl>pscp username@linuxserver:/home/username/keenan/ssl/* .

So you can specify any folder at the root of Linux using :/.

halfer's user avatar

halfer

19.9k17 gold badges102 silver badges189 bronze badges

answered Dec 14, 2018 at 12:47

Keenan Stewart's user avatar

To send a file from windows to linux system

scp path-to-file user@ipaddress:/path-to-destination

Example:

scp C:/Users/adarsh/Desktop/Document.txt [email protected]:/tmp

keep in mind that there need to use forward slash(/) inplace of backward slash(\) in for the file in windows path else it will show an error

C:UsersadarshDesktopDocument.txt: No such file or directory

.
After executing scp command you will ask for password of root user in linux machine.
There you GO…

To send a file from linux to windows system

scp -r user@ipaddress:/path-to-file path-to-destination

Example:

scp -r [email protected]:/tmp/Document.txt C:/Users/adarsh/Desktop/

and provide your linux password.
only one you have to add in this command is -r.
Thanks.

answered Mar 15, 2019 at 6:00

ADARSH K's user avatar

ADARSH KADARSH K

6061 gold badge8 silver badges21 bronze badges

As @Hesham Eraqi suggested, it worked for me in this way (transfering from Ubuntu to Windows (I tried to add a comment in that answer but because of reputation, I couldn’t)):

pscp -v -r -P 53670 [email protected]:/data/genetic_map/sample/P2_283/* \\Desktop-mojbd3n\d\cc_01-1940_data\

where:

-v: show verbose messages.
-r: copy directories recursively.
-P: connect to specified port.
53670: the port number to connect the Ubuntu server.
\\Desktop-mojbd3n\d\genetic_map_data\: I needed to transfer to an external HDD, thus I had to give permissions of sharing to this device.

answered Jun 27, 2019 at 3:37

giannkas's user avatar

giannkasgiannkas

1783 silver badges14 bronze badges

Here is the solution to copy files from Linux to Windows using SCP without password by ssh:

  1. Install sshpass in Linux machine to skip password prompt

  2. Script

    sshpass -p 'xxxxxxx' scp /home/user1/*.* [email protected]:/d/test/

Details:

sshpass -p 'password' scp /source_path/*.* windowsusername@windowsMachine_ip:/destination_drive/subfolder/

serenesat's user avatar

serenesat

4,61110 gold badges37 silver badges53 bronze badges

answered Aug 28, 2015 at 12:47

Ramarajan Jothi's user avatar

Open bash window. Preferably git bash.
write

scp username@remote_ip:/directory_of_file/filename ‘windows_location_you_want_to_store_the_file’

Example:

Suppose your username is jewel

your IP is 176.35.96.32

your remote file location is /usr/local/forme

your filename is logs.zip

and you want to store in your windows PC’s D drive forme folder
then the command will be

scp [email protected]:/usr/local/forme/logs.zip ‘D:/forme’

**Keep the local file directory inside single quote.

answered Apr 7, 2019 at 6:02

Zenith's user avatar

ZenithZenith

1,0571 gold badge10 silver badges21 bronze badges

Try this:

scp /home/ubuntu/myfile C:\users\Anshul\Desktop

Pang's user avatar

Pang

9,623146 gold badges81 silver badges122 bronze badges

answered Jan 12, 2013 at 2:50

Corey Burnett's user avatar

Corey BurnettCorey Burnett

7,31210 gold badges56 silver badges93 bronze badges

1

If you want to copy paste files from Unix to Windows and Windows to Unix just use filezilla with port 22.

answered Sep 4, 2012 at 7:38

user1645422's user avatar

I am running a putty client on a Windows machine to connect successfully to a Linux box. Now I want to be able to copy a file from the Linux machine under the path /home/ubuntu/myfile to C:/Users/Anshul/Desktop on my local computer. The user at the Windows machine is anshul. I am giving the following command on putty but it is not working:

scp /home/ubuntu/myfile ip_address_of_windows_machine:C:/Users/Anshul/Desktop 

I think the path for the Windows machine is wrong. Please help as I have banged my head on a large number of forums but none seem to give correct path for Windows server. Don’t suggest alternate options like WinScp

Guy Avraham's user avatar

Guy Avraham

3,4923 gold badges38 silver badges50 bronze badges

asked Apr 19, 2012 at 19:56

user1344963's user avatar

5

This one worked for me.

scp /home/ubuntu/myfile username@IP_of_windows_machine:/C:/Users/Anshul/Desktop 

answered Mar 12, 2018 at 6:04

emoblazz's user avatar

emoblazzemoblazz

1,4111 gold badge7 silver badges3 bronze badges

6

Download pscp from Putty download page, then use it from Windows Command Line CMD as follows:

pscp username_linux_machine@ip_of_linux_machine:/home/ubuntu/myfile.ext C:\Users\Name\Downloads

Copying starts once you enter the password for the Linux machine.

ifnotak's user avatar

ifnotak

4,1973 gold badges22 silver badges36 bronze badges

answered Jun 8, 2016 at 20:49

Hesham Eraqi's user avatar

Hesham EraqiHesham Eraqi

2,4524 gold badges23 silver badges45 bronze badges

4

Try this, it really works.

$ scp username@from_host_ip:/home/ubuntu/myfile /cygdrive/c/Users/Anshul/Desktop

And for copying all files

$ scp -r username@from_host_ip:/home/ubuntu/ *. * /cygdrive/c/Users/Anshul/Desktop

fluffyBatman's user avatar

fluffyBatman

6,5443 gold badges24 silver badges25 bronze badges

answered Jun 10, 2014 at 11:57

Chris Alexander sebastian's user avatar

8

Access from Windows by Git Bash console (also works for CMD and PowerShell):

scp user@ip:/dir1/dir2/file "D:\dir1\dir2"

Wenfang Du's user avatar

Wenfang Du

9,02412 gold badges60 silver badges92 bronze badges

answered Jan 4, 2019 at 13:18

byteprom's user avatar

byteprombyteprom

5514 silver badges4 bronze badges

5

You could use something like the following

scp -r linux_username@linux_address:path/to/file path/to/local/directory

This will copy file to the specified local directory on the system you are currently working on.

The -r flag tells scp to recursively copy if the remote file is a directory.

answered Feb 16, 2015 at 23:58

Atif's user avatar

AtifAtif

3451 gold badge4 silver badges16 bronze badges

Windows doesn’t support SSH/SCP/SFTP natively. Are you running an SSH server application on that Windows server? If so, one of the configuration options is probably where the root is, and you would specify paths relative to that root. In any case, check the documentation for the SSH server application you are running in Windows.

Alternatively, use smbclient to push the file to a Windows share.

George's user avatar

George

6,9063 gold badges44 silver badges56 bronze badges

answered Apr 19, 2012 at 19:59

theglauber's user avatar

theglaubertheglauber

28.4k7 gold badges29 silver badges47 bronze badges

5

For all, who has installed GiT completly with «Git Bash»: You can just write:

scp login@ip_addres:/location/to/folders/file.tar .

(with space and DOT at the end to copy to current location). Than just add certificate (y), write password and that’s all.

answered Oct 3, 2017 at 12:31

Krzysztof Walczewski's user avatar

1

Your code isn’t working because c:/ or d:/ is totally wrong for linux just use /mnt/c or/mnt/c

From your local windows10-ubuntu bash use this command:

for download:
(from your remote server folder to d:/ubuntu) :

scp username@ipaddress:/folder/file.txt /mnt/d/ubuntu

Then type your remote server password if there is need.

for upload:
(from d:/ubuntu to remote server ) :

scp /mnt/d/ubuntu/file.txt username@ipaddress:/folder/file.txt 

Then type your remote server password if there is need.
note: I tested and it worked.

answered Feb 19, 2019 at 12:09

Baris Vvolf's user avatar

I had to use pscp like above Hesham’s post once I downloaded and installed putty. I did it to Windows from Linux on Windows so I entered the following:

c:\ssl>pscp username@linuxserver:keenan/ssl/* .

This will copy everything in the keenan/ssl folder to the local folder (.) you performed this command from (c:\ssl). The keenan/ssl will specify the home folder of the username user, for example the full path would be /home/username/keenan/ssl. You can specify a different folder using a forward slash (/), such as

c:\ssl>pscp username@linuxserver:/home/username/keenan/ssl/* .

So you can specify any folder at the root of Linux using :/.

halfer's user avatar

halfer

19.9k17 gold badges102 silver badges189 bronze badges

answered Dec 14, 2018 at 12:47

Keenan Stewart's user avatar

To send a file from windows to linux system

scp path-to-file user@ipaddress:/path-to-destination

Example:

scp C:/Users/adarsh/Desktop/Document.txt [email protected]:/tmp

keep in mind that there need to use forward slash(/) inplace of backward slash(\) in for the file in windows path else it will show an error

C:UsersadarshDesktopDocument.txt: No such file or directory

.
After executing scp command you will ask for password of root user in linux machine.
There you GO…

To send a file from linux to windows system

scp -r user@ipaddress:/path-to-file path-to-destination

Example:

scp -r [email protected]:/tmp/Document.txt C:/Users/adarsh/Desktop/

and provide your linux password.
only one you have to add in this command is -r.
Thanks.

answered Mar 15, 2019 at 6:00

ADARSH K's user avatar

ADARSH KADARSH K

6061 gold badge8 silver badges21 bronze badges

As @Hesham Eraqi suggested, it worked for me in this way (transfering from Ubuntu to Windows (I tried to add a comment in that answer but because of reputation, I couldn’t)):

pscp -v -r -P 53670 [email protected]:/data/genetic_map/sample/P2_283/* \\Desktop-mojbd3n\d\cc_01-1940_data\

where:

-v: show verbose messages.
-r: copy directories recursively.
-P: connect to specified port.
53670: the port number to connect the Ubuntu server.
\\Desktop-mojbd3n\d\genetic_map_data\: I needed to transfer to an external HDD, thus I had to give permissions of sharing to this device.

answered Jun 27, 2019 at 3:37

giannkas's user avatar

giannkasgiannkas

1783 silver badges14 bronze badges

Here is the solution to copy files from Linux to Windows using SCP without password by ssh:

  1. Install sshpass in Linux machine to skip password prompt

  2. Script

    sshpass -p 'xxxxxxx' scp /home/user1/*.* [email protected]:/d/test/

Details:

sshpass -p 'password' scp /source_path/*.* windowsusername@windowsMachine_ip:/destination_drive/subfolder/

serenesat's user avatar

serenesat

4,61110 gold badges37 silver badges53 bronze badges

answered Aug 28, 2015 at 12:47

Ramarajan Jothi's user avatar

Open bash window. Preferably git bash.
write

scp username@remote_ip:/directory_of_file/filename ‘windows_location_you_want_to_store_the_file’

Example:

Suppose your username is jewel

your IP is 176.35.96.32

your remote file location is /usr/local/forme

your filename is logs.zip

and you want to store in your windows PC’s D drive forme folder
then the command will be

scp [email protected]:/usr/local/forme/logs.zip ‘D:/forme’

**Keep the local file directory inside single quote.

answered Apr 7, 2019 at 6:02

Zenith's user avatar

ZenithZenith

1,0571 gold badge10 silver badges21 bronze badges

Try this:

scp /home/ubuntu/myfile C:\users\Anshul\Desktop

Pang's user avatar

Pang

9,623146 gold badges81 silver badges122 bronze badges

answered Jan 12, 2013 at 2:50

Corey Burnett's user avatar

Corey BurnettCorey Burnett

7,31210 gold badges56 silver badges93 bronze badges

1

If you want to copy paste files from Unix to Windows and Windows to Unix just use filezilla with port 22.

answered Sep 4, 2012 at 7:38

user1645422's user avatar

Copying files in Windows or Linux is simple enough. Copying files between them, though, not so much. The classic copy-paste with a USB stick method does work, but it’s not very efficient.

Instead, you can transfer files using protocols like SMB and SSH and using FTP applications such as FileZilla. We’ve listed step-by-step instructions for these and more methods in the sections below.

Table of Contents

Ways to Transfer Files between Linux and Windows

Before you start, do keep in mind that, unlike Windows, Linux is case-sensitive. When entering the commands or file paths, users often forget this and can’t figure out why the file transfer doesn’t work despite following the steps correctly.

With that said, here are the various ways to transfer files between Linux and Windows.

Transfer Files Using SMB

The Server Message Block (SMB) protocol is a client-server communication protocol built into most Linux distributions. Here are the steps to transfer files using SMB:

  1. On your Windows system, locate the folder you’re trying to share.
  2. Right-click the folder and select Give access to > Specific People.
    give-access-to-specific-people
  3. Click on Share and press Done on the next screen.
    choose-people-to-share-with
  4. Next, press Win + R, type cmd, and press Enter.
  5. Type ipconfig and press Enter. Note the IPv4 address of the first adapter on the list.
    ipconfig ipv4 address
  6. On the Linux system, launch the File Browser and click on + Other Locations.
  7. In the Connect to Server field, enter the IP from Step 5 in the following format:
    smb://IP
    ubuntu-network-locations-smb-ip
  8. At the authentication prompt, enter your Windows account credentials and press Connect. You can now use this folder to transfer files between Linux and Windows.

Transfer Files Using SSH

Secure Shell Protocol (SSH) is a cryptographic network protocol commonly used for remote login. With an SSH client such as PuTTY, you can transfer files between Linux and Windows via the command line. Here are the steps to do so:

  1. On the Windows system, download and install PuTTY if you haven’t already.
  2. On the Linux system, press CTRL + Alt + T to launch the Terminal.
  3. Install and enable SSH with the following commands on Debian-based Linux systems such as Ubuntu:
    sudo apt install ssh
    sudo systemctl enable ssh --now
  4. On RedHat, CentOS, Fedora, and other systems, use these commands instead:
    sudo apt install OpenSSH
    sudo systemctl enable sshd --now
  5. In case you’re getting blocked by the firewall, use the following command:
    sudo ufw allow 22/tcp
  6. Enter ip addr and note the IP Address.
    ip-addr
  7. On the Windows system, open Command Prompt and use the commands listed below as appropriate.
  8. The following command is to copy a single file. The example shows the file named doc.txt being copied from a remote Linux system to the D drive on the Windows system.
    pscp user@host:remote_path/file_name host_path\file_name
    ssh-pscp-file-transfer-syntax
  9. To copy all files in a folder:
    pscp user@host:remote_path/* host_path\ 
    eg: pscp anup@192.168.10.65:/home/anup/Desktop/naya/* D:\testfolder\ 
  10. To copy all files & folders in a folder:
    pscp -r user@host:remote_path/ host_path\
    eg: pscp -r anup@192.168.10.65:/home/anup/Desktop/naya D:\testfolder\

Transfer Files Using SFTP

You can also use a third-party tool such as FileZilla to transfer files using SFTP (SSH File Transfer Protocol). Here are the steps to do so:

  1. On the Linux system, follow Steps 1 – 6 from the section above to set up SSH.
  2. On the Windows system, launch FileZilla and select File > Site Manager > New Site.
  3. In the Protocol field, select SFTP – SSH File Transfer Protocol.
    filezilla-sftp-ssh
  4. In the Host field, enter the Linux IP Address from Step 6 of the section above.
  5. Fill in the login credentials of your Linux system and press Connect.
  6. If prompted, enable the Always trust this host option and press OK.
  7. Now that the connection is established, you can transfer files between Windows and Linux by dragging and dropping or right-clicking the file and selecting Upload/Download.
    upload-filezilla

You can easily transfer files from Linux to a Windows VM using a USB Stick. Of course, that’s just one easy method. We have an article that details multiple ways to transfer the files for your further reading.

Anup Thapa primarily covers Windows systems, networking, and computer hardware at TechNewsToday. Anup has been writing professionally for almost 5 years, and tinkering with PCs for much longer.
His love for all things tech started when he got his first PC over 15 years ago. It was a Pentium IV system running Windows XP on a single 256 MB stick. He spent his formative years glued to this PC, troubleshooting any hardware or software problems he encountered by himself.
Professionally, Anup has had brief forays into a variety of fields from coding and hardware installation to writing. In doing so, he’s worked with people of different backgrounds and skill levels, from average joes to industry leaders and experts.
This has given him not just a versatile skill set, but also a unique perspective for writing that enables him to concisely communicate complex information and solve his reader’s problems efficiently.
You can reach out to him at anup@technewstoday.com.

Windows 10 now has OpenSSH built in.
https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse

Get an admin command prompt

Open PowerShell as an Administrator.

Check available versions

Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'

Install client

Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

Install server

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

Start server and enable at boot

Start-Service sshd
Set-Service -Name sshd -StartupType 'Automatic'

Find your Windows IP address

ipconfig

On your remote (Linux) machine, find your IP address.

ifconfig

Create a public SSH key

ssh-keygen.exe

Copy public key from local (Windows) to remote (Linux) machine so you don’t have to type in a password all the time.

Note that ssh-copy-id is not currently available on Windows.

cat C:\Users\YOU/.ssh/id_rsa.pub | ssh USER@REMOTE_IP 'mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys'

Do the same on your Linux machine (Note, ssh-copy-id does not work)

ssh-keygen # if needed
cat ~/.ssh/id_rsa.pub | ssh USER@WINDOWS_IP 'mkdir -p ~/.ssh && type con >> C:/Users/YOU/.ssh/authorized_keys'
  • The method above did not work for me, so I ended up manually SCPing the public key over and pasting it into the C:/Users/YOU/.ssh/authorized_keys file.

  • That still did not work, so I had to modify the sshd_config file.

    • Open Notepad as Administrator

    • Open %programdata%\ssh\sshd_config

    • Add the following lines:

        Match User YOU
             AuthorizedKeysFile C:/Users/YOU/.ssh/authorized_keys
  • Reboot

Create a password on Windows if you don’t already have one

System Settings...Sign-in options

— Note, you can still disable the Windows login screen by a) Setting the ‘Require sign-in’ option to never and b) Using the ‘netplwiz’ command and unticking the ‘Users must enter password…’ checkbox.

Now you should be able to SSH or SCP from your Linux machine

scp FILE WINDOWS_IP:C:/Users/YOU/Desktop

It’s an easy process to copy the file from one directory to another within the operating systems, but when it comes to sharing or copying files or folders from one operating system to another such as Linux to windows, it becomes complicated. However, it is not much difficult as most users think.

This article will demonstrate how to copy files from Linux to the windows operating system.

How Can the Files be Copied From Linux to Windows?

To copy or share the file from Linux to windows, we can share that file or folder from its properties. This will be shared in the network just like the windows network we used. Follow the given simple steps to learn the concept.

Step 1: Open the Properties of the Particular File/Folder

First, open the properties of the specific field or folder to be shared. After that, hit the “Local Network share” option and mark the checkbox for sharing the folder:

Let’s move toward the second step.

Step 2: install sharing Service (Samba)

Once you click on the sharing option, Linux will ask you to install to required services, such as “samba” if it is not found in your operating system. The samba is the network file system used for sharing files and folders:

Click on the “Install service” option, and Linux will re-confirm it before installing, as seen in the below image:

After clicking on the install button, the installation will begin.

Step 3: Authenticating and Downloading Samba Libraries

Linux will ask you for user Authentication; authenticate it by entering your system password:

Downloading additional samba libraries, and applying changes:

Note: you can also install samba manually using the given command:

$ sudo apt install samba        #Debian/Ubuntu-based
$ sudo yum install samba        #CentOS/Fedora/RHEL
$ sudo pacman -S samba          #Arch Linux

Move towards the fourth step.

Step 4: Allow Others to Create and Delete

After installing the above libraries, some new options will appear for sharing the folder. Grant Access to the other users to create and delete files in the sharing folder and click on the “create share” option as shown in the below image:

After clicking, you will see that the share option appears on the directory or folder:

The file is shared with other users.

Now let’s check how we can access it in windows.

Step 5: Create the Samba Users

Create the samba username and password for the network, which will be asked when the user tries to access the windows. To do so, run the given command in the terminal:

$ sudo smbpasswd -a itslinuxfoss

Enter the password for the username you have set in the command.

Step 6: Run the Linux IP Address in Windows

Now, open your Windows operating system, press “Windows + R” from the keyboard and type the IP Address of your Linux operating system:

Step 7: Add the Network Credentials

Opening the above IP Address will ask for the user credentials which we have set in step 5. Enter the credentials and press “OK”:

After entering the credentials, the folder will be accessed which can be seen in the below image:

Open the folder for accessing its files:

The above image shows that the folder is accessed.

Note: To Access the Folder Without a username and password you can mark the “Guest Access” mode.

That’s how you can copy files from Linux to windows.

Conclusion

In Linux, to copy or share files/folders from Linux to windows, open the properties of the specific folder or files and activate the sharing option. Activating the sharing option will require some additional libraries such as samba, which can also be installed manually or automatically at the time of sharing, this post has illustrated the method to share or copy files/folders from Linux operating system to windows.

  • Ubuntu terminal for windows terminal
  • Ubuntu connect to windows share
  • Ubuntu как расшарить папку для windows
  • Ubuntu share folder for windows
  • Ubuntu and windows 10 dual boot