Your First Terminal Lab in Ten Minutes
Goal
In three short steps, you check where you are, create your own workspace, and make your first file. There is nothing to install. After you run a command, press Check on that step to see the result right away.
Steps and success conditions
- First, prepare the
/root/first-labdirectory. The first step is done when you have saved the output of the command that shows your current location to/root/first-lab/location.txt. - The second step is done when you create your own working directory named
/root/first-lab/workspace. - In
/root/first-lab/success.txt, leave the single linehello labhubto complete the lab.
How to read the commands
pwdprints the directory you are in right now.mkdircreates a new directory, and the-poption also creates any missing parent path.echoprints the message you give it.>saves the output that would appear on the screen into the file you specify.
If you get it wrong, you do not need to recreate the environment. Read the message, fix the command, and run it again.
Check your current location
First prepare the parent directory with mkdir -p /root/first-lab. Then save the output of the three-letter command that prints the current directory to /root/first-lab/location.txt.
The file /root/first-lab/location.txt contains exactly one line, /root.
Create your workspace
The command that creates a directory is mkdir. Create /root/first-lab/workspace.
The directory /root/first-lab/workspace exists.
Leave your first success message
Use echo output together with > redirection to leave the single line hello labhub in /root/first-lab/success.txt.
The single line in /root/first-lab/success.txt matches hello labhub exactly.