Getting Comfortable with the Terminal
Introduction
Every terminal session starts the same way: a blinking cursor sitting next to some text you might not fully understand yet. It looks like it's waiting for something important, and that can feel intimidating if you've never used one before. Here's the truth: that cursor is simply waiting for you to type. It won't judge a typo, and it won't break if you make one.
In this lesson, you'll learn to read what sits in front of that cursor — called the prompt. You'll run a few simple commands, read the answers they give back, and learn how to tell when something worked and when it didn't. You'll also pick up two keyboard shortcuts that get you out of almost any tricky spot. By the end, that blinking cursor will feel more like a helpful assistant than a wall you can't get past.
One quick note: everything in this lesson uses tools already built into your terminal. On CodeSignal, your environment is ready to go — nothing to install, nothing to set up. You can just start typing.
Anatomy of the Prompt
The prompt is the line of text your shell shows you right before the blinking cursor. It's not just decoration — it's the shell telling you exactly who you are, which computer you're on, and which folder you're currently standing in. Understanding this line matters because it's your constant source of orientation. Without it, you'd have no idea whether you're about to run a command on your own laptop or a remote server, or whether you're sitting in your Documents folder or somewhere completely different.
Here's a typical prompt you might see:
Let's break this down piece by piece:
alex— your username, the account you're logged in as.@Alexs-MacBook-Pro— the hostname, or the name of the machine you're using.~— your current directory (the folder you're in). The~symbol is shorthand for your home folder.%— the symbol that means "your turn." The shell has finished its last task and is waiting for your next command.
That last symbol is the one to watch closely throughout this course. Whenever you see it sitting at the end of a line by itself, it means the shell is idle and ready. If you don't see it, the shell is still busy doing something — which is useful information you'll rely on constantly.
Running Commands That Answer Questions
