The Terminal and the Mouse: Two Ways In
Clicking and typing are two ways into the same computer, each best at different jobs, and learning the terminal gives you a second option without taking the first one away.
Novice · PowerShell · Operating System · Updated
After this lesson you can
- Describe the graphical interface and the command line as two ways into the same computer
- Choose the mouse or the terminal for a job, from what each one does best
Key takeaways
- A graphical user interface (GUI) is windows, icons and buttons you click. The command line is instructions you type. Both reach the same files and settings.
- Many Windows settings have a PowerShell command behind them, so a Settings page and a command can read and change the same thing.
- The mouse is best for looking, choosing and doing something once. The terminal is best for many files, repeated jobs and exact steps you can share.
- You can mix the two. Invoke-Item opens File Explorer from PowerShell, and Open in Terminal starts PowerShell from File Explorer.
You've used a mouse for years: open File Explorer, double-click a folder, drag a file into it. Then a class, a tutorial or an IT ticket says "open a terminal and type this", and a dark window with a blinking cursor can feel like a step back in time. It isn't a replacement for what you already know. It's a second door into the same house, and this course hands you the key.
Two doors into the same house
What you click is the graphical user interface, or GUI (read "gooey"): windows, icons, buttons and menus. The other door is the command line: you type an instruction as text, and the computer answers in text. The window you type in is called a terminal.
Both doors open onto the same rooms. A folder you make in File Explorer is there when you list your files in PowerShell, and a file PowerShell renames shows its new name in File Explorer right away. Nothing is copied between them, because there's only one computer, one set of files and one set of settings.
The same setting, two ways
Many settings in Windows have a PowerShell command behind them. Open Settings, then Time & language, then Language & region, and Regional format shows how Windows writes dates and numbers for you. PowerShell reads the same setting with Get-Culture:
Get-Culture
LCID Name DisplayName
---- ---- -----------
1033 en-US English (United States)
en-US is the short code for English as it's written in the United States, and DisplayName is the name the Settings page shows. Yours shows your own region. The Settings page and the command are two views of one setting, so changing it in one place changes it for both.
What each does best, honestly
Neither door is better. Each is better at different jobs.
The mouse is best when you:
- look at things and choose, such as picking the best three photos from a trip;
- do something once, on one file you can see;
- explore a program you've never used, where the menus show you what's possible.
The terminal is best when you:
- do the same job to many files: renaming 200 photos is one line;
- repeat a job every week, because a script remembers the steps;
- need exact steps to share: "type this line" is clearer than "click the third icon on the left";
- work on a computer with no screen at all, such as a web server.
Most people who use a terminal at work use both every day: the mouse to look around, the keyboard to do the same thing many times.
Mixing the two
PowerShell lets you go from one door to the other. Invoke-Item opens a file or folder the way a double-click would, so this opens File Explorer in the folder PowerShell is working in (. is read "this folder"):
Invoke-Item .
It prints nothing; a File Explorer window opens instead. The other way works too: in File Explorer, right-click an empty part of a folder and choose Open in Terminal, and PowerShell starts in that folder. Later in the course, Out-GridView shows a command's answer in a window you can sort and filter with the mouse, and a script can open a small window of its own.
On a Mac or Linux there's no File Explorer or Settings app, but the idea is the same: Finder or your file manager and the terminal reach the same files. Out-GridView and the small windows are Windows only. Windows PowerShell 5.1 runs everything in this lesson the same way.
Options, not sides
This course never asks you to give up the mouse. The goal is options: when a job comes along, you pick the door that gets it done best. And the terminal can be fun. There's a real joy in typing one line and watching a job that used to take an afternoon finish in a second, or in a prompt dressed in your own colors.
Try it. Think of something you did on your computer this week, such as sorting downloads, renaming files or finding a lost document. Which door would you pick for it, and why?
Check yourself
2 questions to try on the lesson page.
So what
The terminal doesn't replace the mouse. It adds a second way in, and having both means you can choose the faster one every time.