Types of Commands

UNIX-like vs. Windows Commands

The commands you type at the Bash/Zsh command line on a machine running macOS or Linux are sometimes similar to, but often quite different from, the commands you type in a Windows shell. Linux and macOS are said to be “UNIX-like” operating systems because of their similarity to the UNIX operating system developed at Bell Labs in the 1960s.

There are two reasons why, in this course, you’ll learn to use UNIX-like rather than Windows commands, whether or not your computer’s main operating system is Windows. The first reason is simplicity. The second is that a major use of the command line is to issue commands on a computer other than your own—for example, a remote server hosting a website that belongs to you. Since many servers employ UNIX-like operating systems, it’s essential to become conversant in UNIX-like commands.

Still, if you’re a Windows user, you’ll at least want to get yourself familiar with the way file paths are represented in Windows—in particular, the use of the backslash (\) in some cases where UNIX-like systems use the forward slash (/). (Yes, there’s a difference between the two kinds of slash, and now that you know, be kind, not patronizing, when you correct friends you confuse them.)

Using Bash on a Windows machine

You have a few options for installing Bash in a Windows environment. One is to install Git Bash. This has the advantage that the installation process also installs git, a powerful command-line tool for version-tracking and collaboration.

Another option is to install Windows Subsystem for Linux (WSL), which will enable you to run Ubuntu Linux in a dedicated area of your Windows machine.

Git Bash

Begin by downloading Git Bash.

The instructions you’ll follow to install Git Bash call for you to select Microsoft’s Visual Studio Code as your default text editor, so before you go ahead and install Git Bash, you’ll first want to install VS Code. To do so, follow these instructions. Be sure that during the setup, you check the “Add to PATH” box when prompted to “Select Additional Tasks.”

With VS Code installed, you’re ready to install Git Bash. To do so, follow these instructions carefully, starting with Step 2. (Step 1 is downloading the software, which you’ve already done.) The instructions are for Windows 10, but the installation process is essentially the same for Windows 11.

After following the steps in the installation process, launch Git Bash by going to the Start menu and typing “Git Bash.”

When you’re done using Git Bash, type exit at the dollar sign prompt, then hit return or enter.

Windows Subsystem for Linux (WSL)

The easiest way to get WSL is to install it from the Microsoft app store, which you can access from the Start menu. Search there for “Windows Subsystem Linux” or “Ubuntu.”

After launching Unbuntu on your Windows machine, follow the same process described above for Git Bash to enable copy/paste with ctrl+shift+C and ctrl+shift+V for copy/paste.

Finally, note that your WSL installation has its own area within your file system. In your File Explorer, the Linux penguin icon indicates where these are located. As you can see below, the “home” folder of your Linux installation is not the same as your Windows home folder located within This PC > Local Disk(C:) > Users

Location of Linux files in Windows File Explorer


This site uses Just the Docs, a documentation theme for Jekyll.