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, shellWhere you are
pwd prints the folder you are in.
pwdClear the screen
clear empties the screen.
clearOne per line
Commands run one per line.
echo One
echo TwoExample
echo Hello
cd /tmp
pwdKey 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?