How To Get Windows To “Talk” To Linux
Nick writes:
I was wondering if there is any way to have 2 computers,one linux and one windows based, on a network and them be able to communicate.
I have seen "windows network tools" before but i was only able to go to the windows computer and not vice versa.do you know of any way to get a windows computer to talk with a linux computer?
This one I’m not exactly sure how to answer, because "talk" can mean different things. It can mean the sharing of network connectivity, giving access to specific files on any given system on your network, giving access permissions to devices (such as a printer) and so on. I’m going to go on the assumption that Nick is referring to file sharing.
Linux can basically connect to any other computer or device as long as the protocol is supported. When it comes to file sharing, a roadblock people commonly encounter is the "PC X can ‘talk’ to PC Y, but PC Y can’t talk to PC X". Unfortunately there has never been a simple solution to this problem, because, well, different OSes set up their permissions differently.
On the Linux side of things, the most common method is to use Samba, which is specifically designed for cross-platform file and printer sharing; documentation for this is plentiful as it’s been around quite a long time. Ubuntu’s documentation on Samba is here.
On the Windows side of things, Vista and 7 introduced tighter security into the OS, which for some is an annoyance. However I consider it to be a necessary annoyance because it does make for safer networking.
It is true more often than not that the Windows side will be the one that gives you problems when attempting to ‘talk’ to Linux, however there’s a few things you can do to make the process easier.
1. Same-name user and password on both Windows and Linux machines
This isn’t exactly the most secure thing to do, but it makes file sharing easier. If user "Quincy" is on your Windows box with password "OhMagooYou’veDoneItAgain", "Quincy" should be also be on the Linux box with the same password.
Important note: DO NOT make the Linux and Windows box the same machine name, else the sharing won’t work. Usernames can be the same, but machine names cannot.
2. Know your Windows Workgroup
If you have no idea what a Windows workgroup is, it’s probably true your workgroup name is MSHOME or WORKGROUP. You should probably change this to something you’ll remember.
If you wanted to change the workgroup to, say, ROADHOG, how to do this in XP is here, and for Win7 is here. Note that you will have to reboot once when you do this for the changes to take effect.
3. Linux is usually the better environment to share out from
Windows in general has a wacky way of sharing out stuff over a network. And by wacky I mean sometimes shares can randomly disappear and reappear (i.e. "That network resource was in my Network Places list a second ago.. where’d it go?) This is especially true when trying to access stuff over wireless or trying to make XP and 7 Win boxes "play nice" with each other.
Linux’s way of file sharing is for all intents and purposes more "solid" because it basically acts like a server even when running as a desktop. When you share something out from Linux, the likelihood of any wacky network stuff happening is slim to none. If going from Linux to a Win box on the other hand, wacky stuff can happen. Sometimes you may have no choice in the matter, but be advised network "weirdness" can happen when doing the Win-to-Linux thing.
4. When all else fails, connect "direct by IP"
Each PC on your network whether Linux or Windows based has a machine name, but sometimes these names simply won’t translate over the network. If that happens, you connect to the shares directly by IP address instead of the machine name to skip over the name translation process altogether.
Let’s say you have your Win box Waldo and your Linux box McBarker, and when you try to connect to either one by machine name, it just doesn’t work.
Find out what the IP address of each box is (your router’s administration program is the easiest way to do this). We’ll say Waldo is 192.168.0.5 and McBarker is 192.168.0.6. When connecting to a share on either box, use the IP instead of the name. If connecting from the Win box to the Linux box, you would go into the Windows Explorer’s address bar and type \\192.168.0.6 to see all the shares available on the Linux box.
This obviously isn’t a pretty solution, but it works. And if it doesn’t, it’s either a permissions issue or the other box can’t be contacted, which you would test by PINGing the box from the Command Prompt (e.g. PING 192.168.0.6 to see if you get a reply).
If you do find the direct-by-IP method works for you, I do strongly suggest assigning permanent IP addresses since they were probably dynamically assigned by the router. What this means is setting up each box on your network so it always acquires the same IP address instead of having the router randomly decide which address to assign based on which device connects first.
One thought on “How To Get Windows To “Talk” To Linux”