
A black window with a blinking cursor can feel like a place where one wrong key destroys your computer. In reality, the command line is just another way to give instructions: instead of clicking icons, you type short commands and press Enter. It is faster for many tasks, and many developer tools, from Git to Python, are used mainly through it. This guide covers PowerShell on Windows and the shells of macOS and Linux side by side.
Before graphical interfaces, typing was the only way to use a computer. The Unix shells of the 1970s set the pattern still used today, and Bash, released in 1989, became the standard shell on Linux. macOS switched its default to zsh in 2019, which works almost the same way. Windows had the old Command Prompt, then Microsoft introduced PowerShell in 2006; since 2016 it is open source and also runs on macOS and Linux. On Windows 11 the modern Windows Terminal app hosts PowerShell by default.
You will see a prompt, such as PS C:\Users\anna> on Windows or anna@laptop ~ % on macOS. It tells you that the shell is waiting and usually shows the folder you are in. The symbol ~ means your home folder.
The terminal is always "standing" in one folder, called the current or working directory. Three commands let you find your way, and they work in PowerShell, macOS and Linux alike:
Paths can be relative to where you are (cd projects/site) or absolute, starting from the top (cd /Users/anna or cd C:\Users\anna). Windows uses backslashes, macOS and Linux use forward slashes, and PowerShell accepts both.
If a name contains spaces, wrap it in quotes: cd "My Projects". Otherwise the shell treats each word as a separate item.
You never need to memorise options. On macOS and Linux, man ls opens the manual for a command (press q to quit), and most tools also accept --help. In PowerShell, Get-Help Get-ChildItem explains a command and Get-Help Get-ChildItem -Examples shows ready-made examples. Error messages help too: they usually name the exact problem, such as a missing file.
Most commands are harmless; reading and moving around cannot break anything. A few deserve respect:
Spend fifteen minutes in a test folder: create it with mkdir practice, enter it, create two files, rename one, copy it, list the contents, then delete everything and go back home. Repeat it on another day and the commands will start to feel natural. From there, the command line becomes the gateway to setting up a development environment, running scripts and automating boring tasks.
Grade 10 Math: Functions and Reasoning - Quiz
1170 questions