Networking is stupid. You'd think it'd be real darn easy to share stuff between PCs and Macs, but it's not as simple as it should be. So, here's how to make 'em talk and share stuff like best friends.
What You Need • A Windows PC (Linux dudes, you already know how to do this, right?) • A Mac • A router to connect them
Before we get into sharing between computers directly, are you sure you don't just want a NAS?
Talk to Me, Girl So, assuming that your PC and Mac are both sitting comfortably on your network, wirelessly or otherwise (if you haven't gotten that far, you need more help than I'll be providing right here), there are a couple of different ways for the various machines on your network to talk to each other and share files. Think of 'em sorta like languages.
• SMB (Server Message Block) aka CFIS (Common Internet File System) is Windows' preferred network file sharing protocol, and luckily, Macs speak it, so this how your computers will most likely be talking and sharing stuff. Vista and Windows 7 use SMB 2.0, which is mo' faster for file transfers.
• FTP (File Transfer Protocol) is one you know and love, if you've ever spent any time on the internet. It's one option for sharing stuff between your Mac and PC.
• NFS (Network File System) is the protocol Unix-based systems like to use for sharing files, which both Windows and Macs can understand. A lot of NASes use it.
• AFP (Apple Filing Protocol) is like a secret language for Macs, 'cause Windows sure as crap don't speak it. But from Mac-to-Mac, it's what makes sharing just work (when it does).
Things That Will Help My goal here is to show you how to share files between your PC and Mac easily, and for the most part, without worrying about things like IP addresses or diddling with your router's settings. But! If you want to make troubleshooting easier - this kind of networking is more voodoo than science - there are a few things you could stand to know and do beforehand.
1. Know your router. Or really, know how to get into it. For most routers, punching the number soup 192.168.1.1 (Linksys, for instance) or 192.168.0.1 (D-Link, for example) into your web browser will take you to the router's settings, where you can fiddle with things (which you hopefully already did to protect your network).
2. Make everything static. If you take your computer on and off the network a lot, odds are, your router isn't going give it the same IP address every the computer jumps back on, because it hands those addresses out dynamically (you might recognise this as DHCP in action, if you're wondering what that acronym refers to). For consistency's sake, it's not a bad idea to assign your computers static IP addresses on the network, so they'll always have the same address - I at least give my desktop PC and Xbox static IP addresses - just in case something else is broken.
Look in the router settings for a reference to DHCP reservations or static DHCP, which is most likely under the general settings tab. Hit that up, like so, and you should see a list of computers on your network, along with their MAC addresses (an ID tied to the actual networking card in your computer) and currently assigned IP address (something like 192.168.1.102). If your computer's already connected to the network and listed here, it's real easy to give it an unwavering address on your network, a matter of a couple checkboxes.
If, for some reason, your computer's not on the network and you wanna give it a static address, like 192.168.0.104, you're gonna need to know its MAC address. On a Mac, just open the Network Utility app and select AirPort - it's the "hardware address". In Windows Vista and 7, go to Network & Sharing centre, and tap view status link next to your connection. Hit "details" in the pop up box and note the "physical address". On XP, bring your network connections, double click the one you want, flip to the "support" tab, and hit details. It's the physical address. Now that you have the MAC address for your computers, you can assign a set IP address to each one, that it'll have every single time it's on the network, which is a handy list to have.
Getting Ready OK, let's get our machines ready. We'll start with the Mac, 'cause it's a little easier.
Mac 1. Setup a user account for sharing, either under Accounts or Sharing -> File Sharing in System Preferences. (Unless you just wanna log in from Windows using your regular Mac login, then you can skip creating a sharing account.) Click the little plus sign under users, and then you pull can a name out of your address book to use for the account, or setup a whole new one.
2. Open system preferences, go to sharing if you haven't already, and check the box for file sharing. Click options, and enable AFP (if you've got other Macs you wanna share with) and SMB. Crucially, make sure the account you're gonna be logging in from Windows with has SMB enabled.
3. To pick the folders you wanna share with other users, click the little plus sign and browse to the folder you wanna give access to. Maybe it's your pictures, maybe it's your whole Home folder. You'll need to add each folder individually, especially if you wanna give different people access to different folders. (If you're logging in from Windows with your standard Mac account, you'll have access to your whole hard drive anyway.)
After you've picked the folder you wanna share, then you just pick the user you want to share with, and how much access you want them to have. Read-only, write-only or read and write.
4. Note your computer's name on the local network. It's sitting on top of the main file sharing setting page. And, if you've got AFP turned off, you'll get this dialog, noting the IP address Windows users can access your stuff.
5. Go back to the main system preferences page, then click on Network. Go to the main connection you'll be using, like AirPort, and click advanced. Go to WINS, and set your Workgroup to the same one as your Windows PCs (probably either WORKGROUP, on newer Windows machines or MSHOME on XP).
Windows 7 and Windows Vista In Windows 7 and Vista, the Network and Sharing centre is where we'll be spending our time.
1. First, make sure in your little path to the internet up top, you've got a picture of a house sitting between your computer the internet globe at the top. That means you've got it set to private network, so stuff's a little more exposed to other computers on the network. If not, click Customize to the right of the network name, and set it to private network.
2. In Vista, you'll notice the big ol' Sharing and Discovery section up front and centre. In Windows 7, it's under advanced sharing settings. Go in there, and you'll want to enable network discovery, and make note of your Workgroup (so you can make sure your Mac is on the same one) which is listed here. Also, you have the option to turn off password-protected sharing, so that you don't need an account on the machine set up for sharing. Obviously, it's less secure, but if you prefer convenience, that's up to you.
3. Now for some voodoo that's not required, but will make life easier because of OS X and Windows shake hands like goons (really it's about making the LAN Manager Authentication Level slightly less stringent, so OS X has an easier time connecting to Windows). If you have Windows 7 or Vista Ultimate, go to the Control Panel, then Administration Tools, then local security policy. Hit local policies, then security options, and look for Network Security LAN Manager Authentication Level. There, you want to switch it to "send LM & NTLM, use NTLMv2 session if negotiated".
If you're in Windows 7 or Vista Home Premium, you don't have access to that, so you'll need to registry hack it up. Open up regedit, and look for this:
Double click on LmCompatibilityLevel, and set the value to 1.
4. Now, we'll need to set up an account to share with. (Again, you can skip this if you're just going to use your regular Windows login from your Mac, though you'll need to have a password on the account for it to work best in Vista.) Go to User Accounts in Control Panel, then to Manage Accounts. Create a new account.
5. If you're going to be logging in with your main administrator account, you can skip this step, since you'll have access to everything anyway. For all other accounts, go to the folder you want to share, right-click on it and hit properties. Click the sharing tab, hit "share", and then you can add users to the share list, along with their permissions. Windows will share it, and give you the network path where you can access it. Alternatively, go to Computer, right-click, and check out the system properties and note your computer's name on the network and its Workgroup (make sure the Workgroup is the same as your other computers, it makes life easier).
Windows XP XP's feels pretty damn ancient when it comes to Networking. Anyways, it's mostly the same stuff, just with a slightly uglier interface. I found this guide helpful when I was trying to remember where everything was.
1. Like before, you'll need a user account and password setup. Go to control panel, user accounts and create a new one, if you need to.
2. Make sure you're on the same workgroup as everything else - XP Home defaults to MSHOME, so if you need to change it, right-click on My Computer, hit properties, then go to Computer Name, and go to "Change" if you need to switch up the Workgroup.
3. Go to the folder you wanna share, right-click, hit properties, and switch over to sharing. Allow it to be shared over the network, and allow users to change files.
OK, if you've done everything correctly, and the gods are pleased, what you should see on your Mac in your Finder Sidebar under the Shared tab is your Windows computer. (Make sure Shared is enabled in your Finder sidebar preferences, or you won't see it.) Then, you should be able to just click on it, enter your user account and password, and voila, you can get right at everything just like you hoped.
On your Windows 7 or Vista machine, you should be able to click Network, and see all of your connected computers, including your Macs. To login, as Ross McKillop points out, your username is the name of the Mac followed by the OS X username, like this, minus the quotes: "MATTBOOK/matt". In XP, you'll go to My Network Places or Workgroup, and it should be the same deal, though you can just stick to the actual Mac username and password. Life's good.
Sometimes, things don't work like that. PCs don't show up in the Finder automagically, you can't login easily from your PC. Network discovery just isn't always that reliable. In that case we go all manual mode. Remember earlier, when I had you note your computer's name on the network and setup a static IP? That's where this comes in handy. So, know either your computers names, or their IP addresses on your network.
On a Mac, it's pretty simple. Go to Finder, tap CMD+k and punch in:
smb://computername or smb://192.168.X.XXX
The latter is the PC's IP address, which should be something like 192.168.0.105 - unless you have a weird setup - though the last two numbers of it will obviously vary. The computer name is easier and usually better, especially if you don't have a static IP address setup.
It'll ask you what volume to mount (what folder you want stuck on your Finder Sidebar under shared, essentially), and a login, and then you're good to go. If prefer the CMD+k approach, you can add computers you tap a lot as a favourite, so you don't have to type it in every time.
It's pretty simple in Windows too, actually. Either in the Windows Explorer address bar, or the Run command type:
\MACNAMEFolder or \192.168.X.XXXFolder
And it should give you the option to login there, giving you access to all of your stuff. Using the full address of the folder you're trying to get to will help with making sure the authentication pop-up appears - otherwise you might just see automatically what's publicly shared and not the stuff you're trying to log into.
Shortcuts Logging in every single time would be a pain in the dick, but luckily you can make shortcuts to this stuff. On a Mac, as Gina points out here, under Accounts, you can add a network share to login items, so it'll connect every time you start up your computer. In Windows, you can either create a shortcut by right-clicking on the share, or you can add your Mac's shared folder as a mapped network drive, so it'll connect to the folder every time you fire up your computer.
Your Tips and Tricks There is more than one way to tackle this particular angry bear, so if you've got your own tips and tools to share, please drop some links in the comments - your feedback is hugely important to our How To guides.
And if you have any topics you'd like to see covered here, please let us know. Happy sharing!