The shell and the prompt
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version.
The prompt
- When the terminal is ready, it shows a prompt and waits:
student@linux:~$
- That tells you who you are (
student), the computer (linux), and the folder you are in (~, your home). - You type a command after the
$, press Enter, and the computer runs it.
Where am I?
- The command
pwdprints your current folder — your "you are here" on the map:
pwd
- Press the ▶ on that example to try it. (
~is short for your home folder,/home/student.)
Make the computer talk
echosimply prints back what you type. It is the classic first command:
echo Hello from the shell
- Run it, then try the two tasks below.
Common mistakes
- Commands are case-sensitive:
LSis notls. - The shell runs one command per line when you press Enter.
Difficulty 1/5 · 100 coins + a small bonus on first completion today
The prompt is waiting for a command. Type pwd (print working directory) to see which folder you are in, then click Run.
Difficulty 1/5 · 100 coins + a small bonus on first completion today
echo prints back whatever you give it. Use it to print the word hello.
Difficulty 1/5 · 100 coins + a small bonus on first completion today
The shell splits an unquoted line into words, so echo receives my and gap and joins them with one space. Put the text in double quotes to keep it as one word: print my gap with the three spaces, using echo "my gap".