The terminal is a conversation in text. You type a command, press Enter, and a program called the shell (on most Linux systems it's bash) runs it, prints what it has to say, and waits for the next one.
Reading the prompt
The line the shell shows while it waits is the prompt:
learner@sandbox:~$
learneris the user you're logged in as.sandboxis the computer's name.~is the directory (folder) you're in.~is short for your home directory, the one place on the system that belongs to you.$means the shell is ready for a command.
Three commands to start with
pwd (print working directory) prints where you are, as a full path from the top of the system:
pwdls (list) shows what's in the directory you're in. Folders appear in blue:
lsecho prints back whatever you give it. It sounds useless, but you'll use it to write files and check variables later:
echo Hello, terminalGood to know
- Commands are case-sensitive:
lsworks,LSdoesn't. - A typo gets
command not found. Nothing breaks; press ↑ to bring the command back, fix it and press Enter again. clear(or Ctrl+L) empties the screen, andhelplists every command this practice terminal knows.