🎓 A1Learner
🔍
0 of 50 lessons completed

Shell First Commands

A command is one instruction you type for the shell. The shell runs it when you press Enter.

Print words

echo prints the words after it.

echo Hello, shell

Where you are

pwd prints the folder you are in.

pwd

Clear the screen

clear empties the screen.

clear

One per line

Commands run one per line.

echo One
echo Two

Example

echo Hello
cd /tmp
pwd

Key points

  • File: words or data saved under a name.
  • Folder: a place that holds files.
  • Command: one instruction you type for the shell.
  • Use echo to print words on the screen.
  • Use pwd to print the folder you are in.
  • Use clear to empty the screen.

In this example, echo prints Hello first. Then cd moves the shell to /tmp. Lesson 7 shows cd in full. Then pwd prints /tmp.

Try it Yourself

Edit the code, then press Run.

Running is simulated

Exercise

Which command prints words on the screen?