Six commands, six muscle memories. Type each one and watch the shell do exactly what you asked.
The box at the bottom of this page is a terminal: a text-only interface to a computer. No icons, no mouse, no drag-and-drop. You type a command, press Enter, and the computer does what you asked and shows you the result.
Every professional software developer spends significant time in a terminal. Once you know a handful of commands, it's faster than clicking through folders and files. More importantly, most of the tools you'll meet later in this course - version control, package managers, remote servers - only have a terminal interface. Learning to move around in the terminal is like learning to drive: awkward at first, then second nature.
You're looking at a real Linux shell running in a sandboxed container in the cloud. Anything you type is safe - nothing you do here can touch your own computer. When the lesson ends, the container is thrown away.
Look at the terminal. Before each line you type, you'll see something like this:
learner@shell:/work$That's called the prompt. It's the shell's way of saying "I'm waiting for you to type something" - the shell prints it automatically before each command, you never type it yourself. Three pieces of info are baked into it:
learner - the username you're logged in as./work - the working directory: the folder you're currently "in". All commands run relative to this folder unless you say otherwise.You start in a folder called /work. Inside that folder there is:
notes/ subfolder.notes/ there are two files: README.md and ideas.txt.drafts/ subfolder (currently empty).Your job in this lesson is to move around, look at what's there, and create a new file - all with typed commands.
Walk through these in order. Type each one exactly, then press Enter. Watch what the shell does after each one.
1. - print working directory
pwd just tells you which folder you're currently in. It's the first command you run whenever you're unsure where you are.
pwdExpect to see /work printed back.
2. - list
ls (think "list") shows you the files and folders inside the current directory.
lsYou should see README.md, ideas.txt, and drafts listed.
3. cd notes - change directory
(change directory) moves you into another folder. Type cd followed by a space and the folder name.
cd notesNothing prints, but your prompt changes - the path part now says /work/notes. Run pwd again if you want to confirm.
4. mkdir drafts - make directory
creates a new folder with the name you give it.
mkdir draftsRun ls after to see that drafts appeared alongside the existing files.
5. touch drafts/idea.txt - create an empty file
is weirdly named but useful: it creates an empty file with the name you give. Here you're creating a file called idea.txt inside the new drafts/ folder you just made.
touch drafts/idea.txtRunning ls drafts will show the new file.
6. cat README.md - read a file
prints the contents of a file to the screen. The name is short for "concatenate", but day-to-day you'll mostly use it to quickly read text files without opening an editor.
cat README.mdThe contents of README.md will print out in the terminal.
When you've run all six commands, click Submit at the top of the screen. The grader will check three things:
/work/notes./work/notes/drafts/idea.txt exists.cat command (so we know you actually read the README).If any check fails, read the red message - it'll tell you what's missing so you can adjust and submit again.
$ is where you type.pwd prints the working directory. ls lists files. cd folder moves into a folder.mkdir name makes a new folder. touch name makes a new empty file. cat file prints the contents.The box at the bottom of this page is a terminal: a text-only interface to a computer. No icons, no mouse, no drag-and-drop. You type a command, press Enter, and the computer does what you asked and shows you the result.
Every professional software developer spends significant time in a terminal. Once you know a handful of commands, it's faster than clicking through folders and files. More importantly, most of the tools you'll meet later in this course - version control, package managers, remote servers - only have a terminal interface. Learning to move around in the terminal is like learning to drive: awkward at first, then second nature.
You're looking at a real Linux shell running in a sandboxed container in the cloud. Anything you type is safe - nothing you do here can touch your own computer. When the lesson ends, the container is thrown away.
Look at the terminal. Before each line you type, you'll see something like this:
learner@shell:/work$That's called the prompt. It's the shell's way of saying "I'm waiting for you to type something" - the shell prints it automatically before each command, you never type it yourself. Three pieces of info are baked into it:
learner - the username you're logged in as./work - the working directory: the folder you're currently "in". All commands run relative to this folder unless you say otherwise.You start in a folder called /work. Inside that folder there is:
notes/ subfolder.notes/ there are two files: README.md and ideas.txt.drafts/ subfolder (currently empty).Your job in this lesson is to move around, look at what's there, and create a new file - all with typed commands.
Walk through these in order. Type each one exactly, then press Enter. Watch what the shell does after each one.
1. - print working directory
pwd just tells you which folder you're currently in. It's the first command you run whenever you're unsure where you are.
pwdExpect to see /work printed back.
2. - list
ls (think "list") shows you the files and folders inside the current directory.
lsYou should see README.md, ideas.txt, and drafts listed.
3. cd notes - change directory
(change directory) moves you into another folder. Type cd followed by a space and the folder name.
cd notesNothing prints, but your prompt changes - the path part now says /work/notes. Run pwd again if you want to confirm.
4. mkdir drafts - make directory
creates a new folder with the name you give it.
mkdir draftsRun ls after to see that drafts appeared alongside the existing files.
5. touch drafts/idea.txt - create an empty file
is weirdly named but useful: it creates an empty file with the name you give. Here you're creating a file called idea.txt inside the new drafts/ folder you just made.
touch drafts/idea.txtRunning ls drafts will show the new file.
6. cat README.md - read a file
prints the contents of a file to the screen. The name is short for "concatenate", but day-to-day you'll mostly use it to quickly read text files without opening an editor.
cat README.mdThe contents of README.md will print out in the terminal.
When you've run all six commands, click Submit at the top of the screen. The grader will check three things:
/work/notes./work/notes/drafts/idea.txt exists.cat command (so we know you actually read the README).If any check fails, read the red message - it'll tell you what's missing so you can adjust and submit again.
$ is where you type.pwd prints the working directory. ls lists files. cd folder moves into a folder.mkdir name makes a new folder. touch name makes a new empty file. cat file prints the contents.