Do you need to copy files from Linux over to machine running Windows? Well in this Linux tutorial we are going to show you how to copy files from a Linux machine over to a Windows machine. It can be a little bit tricky because the two machines don’t really speak in the same language. But most Linux distros have gone the extra mile to make that compatibility. By including support for a protocol called SMB server message block. In a Linux system, the service called as samba and it’s usually installed an operational right out of the box.
Setting up Windows for Sharing Files
For sharing files first thing we want to do is to create a file share on my Windows machine. Now create a folder in your computer with the files you want to share. Right-click on that folder and then look for the “Give access to” option and under “give access to” choose specific people who you want to share it out too.
Now set the read-only permission for outside users. So once that’s done you can share the folder and now it’s available on the network. You can now access this folder by using hostname which is shown below the created folder or by IP address. Accessing with IP of your computer which is usually a little more reliable than using the hostname.
For this purpose find the IP address of your system. The quick and an easy way to do that is to open your command prompt and type ipconfig to get IP address configuration. Now grab the IP address of the very first adapter like 123.02.82.3 that’s the address that you want to get connected.
Setting up Linux for Sharing Files
Now jump over to your Linux system where we gonna connect to that folder over on Windows and once we connected we can copy files from Linux over to Windows or vice-versa. For this first, go to the file explorer inside of the file navigation window. you’ll see different options down here. But we have to select an option that says “other locations” if you click on other locations it will scan your network and look for other network resources.
If your machine shows up in the list you can double click on it authenticate and you’re in. But there’s plenty of times where Windows doesn’t show up here in the list especially if network discovery is turned off which is by default in some networks. So in that case, we gonna have to tell the Linux box where to go. Now for that, the box down at the bottom comes in the picture where it says ‘connect to server’.
So to find your windows machine on your Linux system type the address of your windows machine. Type the bellow Address format with your windows IP.
smb://Ip you find earlier/ Hostname of your windows
Like:= smb://12.23.343.12 or smb://dane_doslaptop
Connecting for Sharing Files
Mostly you can go with the IP address because it is a little more reliable than a domain name. Now when you connect it’s gonna ask you to pick which folder you want to access or if you know the folders name you could just type it with the address.
Now go ahead and click the connect button when you go for connecting it’s going to ask you to authenticate. You can set it up from anonymous access but that’s not very secure so the default is you need to be a registered a user with an account on that system. Now provide the user credentials for that system. Such as the username and the password of your account. If the given credentials are right you gonna immediately connected to your other device.
Once the connection is successful you can easily share the folder files between Linux and Windows system. By this method, you can successfully copyy a file from my Linux workstation right over to your window station by using SMB all built into the Linux distro by default.