If you’re new to programming, working on Windows, and want to get started with command line, I recommend using Git Bash.
The advantage of Git Bash is it uses Unix-based commands which are common across a variety of platforms (Mac, Linux, many web servers, etc.). This is in contrast to commands you’d use in something like PowerShell, which is a Windows-specific command line program. I only recommend focusing on PowerShell if you know your development work is going to be Window’s specific.
Another advantage of Git Bash is it’s lightweight and easy to set up. This is in contrast to something like WSL (Windows Subsystem for Linux), which is another way you could get a Unix-based programming environment on Windows. The setup for WSL is a little more complex and in general has more overhead, so it’s not the path I suggest for beginners.
All the “why Git Bash” behind us, let’s dig into the details...
Visit https://gitforwindows.org/ and click the Download button. What you’re downloading is actually a package of software related to Git version control; as part of this package, you’re getting the Git Bash command line program.
When you load the installer, it will take you through a series of screens to configure your install. As shown in the video, As shown in the video, I leave all these options as their defaults except for the following two screens.
After the installer is complete, you should have access to the Git Bash program that looks like this:
In the video, I highlight the following commands:
cd Change directorycd ~/ Change to your home directory using the ~ shortcutcd ../ Move “up” one directoryls List directory contentsnano example.txt Create a new text filecat example.txt Show the contents of a text filerm example.txt Remove a filerm -r demo Remove a directoryFor more guidance on commands, check out my video Command Line Basics (Terminal / Git Bash) starting at the 6:34 timecode (everything before that talks about getting your command line program set up, which you just did!)
No subscriptions, no auto-renewals.
Just a simple one-time payment that helps support my free, to-the-point videos without sponsered ads.
Unlocking gets you access to the notes for this video plus all 200+ guides on this site.
Your support is appreciated. Thank you!