Setup for Windows
This guide will help you setup a software development environment on Windows 7 and above. By the end, your computer will be configured with the same state-of-the-art tools used by professional software developers.
This guide is mostly compatible with older versions of Windows. So follow along as best you can while Googling any problems you come across.
Discovering the Home Directory
Throughout the workshop, you'll be creating and editing files. The best place to store those files is in a Projects folder within your Home directory (aka Home folder). In Windows, you can find your home directory by copying and pasting the following address into your Windows Explorer address bar:
Double-click on folder with your name or user account name on it to open it. This folder IS your Home directory. Note that it's not explicably named Home. Additionally, if there are other users on your computer, their names will also appear in the Users folder. Once you're in your Home directory, create a Projects folder. You will store your files in that folder during the workshop.
A Unix shell (often referred to as a "terminal") is a command line user interface between you and your computer's operating system. In a Unix shell, you can type in commands that tell the computer to do many things: navigate to files and folders, install and run programs, and change configurations. Programmers rely on their Unix shells to do lots of work, quickly and easily.
You're probably most familiar with the graphical user interface (the "GUI") of your computer's operating system. Those are the boxes, windows, and menu items that you click on with your mouse. While that's technically a shell too, most programmers think of the textual, command line interface when they hear to word shell.
Sadly, Windows does not include a Unix shell. Let's fix that.
CAVEAT: Until Windows adopts more Unix standards, please be aware that any Unix-based tools written for Windows will inevitably have some quirks.
Install Git for Windows
Git for Windows brings the full feature set of Git to Windows. (More on Git in a moment.) It also includes Bash, a popular Unix shell. Besides giving you the ability to talk to your computer by typing commands, it also lets you use Git in the command line, just like other Unix environments.
What's Git? It's a very popular version control system. Version control systems let programmers share and collaborate on code. With Git, multiple programmers can work on the same files, and Git keeps track of who made what changes, when. Git is usually used with a website, GitHub, that stores code (in "repositories") and lets programmers review and discuss changes before they are added. In short, Git makes everyone's lives easier.
To get started, download Git for Windows. Once you click the "download" button, you'll see a list of download options.
Look closely at the first two filenames in the list. One says "32 bit", and the other says "64 bit". Those are the different versions for 32-bit and 64-bit Windows. Download the one for your system. If you don't know whether your version of Windows is 32- or 64-bit, find out.
Once you get it downloaded, double-click the file to open the installer. It will guide you through several options; the defaults are just fine, so keep on clicking "Next" until it's done.
When it's done installing, use the Start Menu to launch Git Bash. TIP: search for and open "Git Bash", not "Git CMD" or "Git GUI". Then, pin it to your Start Menu so it's easy to find.
After it's launched, you'll see something like this.
Ignoring the welcome message and the git help, here's a quick break down of what you're seeing in the Terminal app.
||Name of your user account|
||Name of your computer|
||Name of your working directory|
Any characters you type will appear after the
$ prompt symbol. Go ahead and type
uname. After pressing the Enter key, you'll see something like this.
Here's what happened:
- The shell waited for you to type a command.
- You then typed the word
unamewhich appeared after the prompt.
- You pressed the Enter key which triggered the shell to accept your input.
- The shell searched for a program called
- Once found, the shell launched the
unameprogram and handed it control over the Terminal.
- While running, the
unameprogram told the Terminal to display the word
- Once finished, the
unameprogram exited and handed control of the Terminal back to the shell.
- The shell told the Terminal to display another prompt.
- Once displayed, the shell began waiting for your next command.
Simply stated, a Unix shell works in a read-evaluate-print loop or REPL.