Copy files between Linux and Windows
You are on a Linux host
You want to access a Windows drive
So you are on a Linux computer and want to access a Windows drive over the network. In this example we assume winhost is your Windows computer's hostname (you can check the hostname by right clicking on My Computer and selecting Properties). Go to the Windows computer and open the Explorer. Share a folder by right-clicking onto it and selecting "Sharing and security". Call it "share1". Then, on your Linux computer,
- Open up your favorite file explorer, perhaps Konqueror or Nautilus
- In the address bar, type smb://winhost/share1
- You should now see the files and folders in that share. Double-click on them to open them up and view them.
If that doesn't work, then you may need to do something more complicated.
- install the samba client software
- try to find the share:
smbclient -L winhost
- If you see the share, mount it like this:
mount //winhost/share1 /mnt/smb
- after the next reboot, your mount will be lost. To make it persistant, add the following line to your /etc/fstab:
//winhost/share1 /mnt/smb smbfs defaults 0 0
So you are on a Linux computer and want to share a folder so that also Windows machines can access it over the network. To do this, you run the SAMBA service on your computer. To enable sharing to Windows machines, right click on a folder in Nautilus; the menu should have an item called "Sharing Options". Click it and pick the name for your share. If you don't have Windows folder sharing enabled yet, Nautilus will ask you for a password and install the service, after which you will need to log out and back in. The share should now be available on the Windows computer.
See also Setting up a Samba Server.
You are on a Windows host
You want to access a Linux drive
Use WinSCP. Choose the SFTP protocol; the login and password are the same as those you use when logging in locally. If it does not work, look at your Linux computer: Try to shut down your firewall and install the openssh service.
You can share files with Linux using normal Windows sharing mechanisms. The Linux host will be able to access these files using samba.
- Accessing windows shared folders in linux
- Accessing Windows Shared Folders
- Mounting & Accessing Windows Shared Folders on Linux
- Mount a Windows shared folder in Linux