Welcome — your first file.
You're in a virtual machine, in the browser. Nothing was installed. That window below with the blinking cursor is a terminal, and from now on it's your main tool.
What a terminal is
A terminal is a program that accepts typed commands and runs them. Each command is a word — sometimes with arguments. At the end of the command you press Enter, the program does something, and hands control back to you.
Before windows, icons, and the mouse, every computer was driven by text. That model — called the command line — never went away. It became the professional layer. Almost everything a developer does today passes, at some point, through a terminal.
Your first task
In the current directory you're going to create a file called hello.txt. Its contents are exactly the text hello world followed by a newline. Use the four commands below, in order.
pwd- prints where you are in the filesystem (print working directory)
ls- lists the files in the current directory — you shouldn't see
hello.txtyet echo "hello world" > hello.txt- creates the file with that content in a single line
cat hello.txt- prints the file contents to confirm
user@cyberfuturo:~/curriculum$ pwd /home/user/curriculum user@cyberfuturo:~/curriculum$ ls README.md cf lessons/ user@cyberfuturo:~/curriculum$ echo "hello world" > hello.txt user@cyberfuturo:~/curriculum$ cat hello.txt hello world $ █
What the > does
The > symbol is a redirect. Normally echo prints to the screen; with > it writes to the file on its right. If the file already existed, it's overwritten. If you wanted to append without erasing, you'd use >>.
This is one of the moments the terminal starts to feel like a language. You combine small pieces to do big things.
Validate with ./cf check
When you're ready, run ./cf check in the Codespace. The validator looks at the real state of your filesystem and tells you what passed and what's missing. There's no “almost right” — either hello.txt exists with the correct content, or it doesn't.
If something goes wrong
If the file ends up with quotes inside the text, you probably typed echo hello world without the quotes, or used curly quotes from your editor. Delete it with rm hello.txt and try again. If the content ends without a newline, the test will tell you with a specific hint. If you got lost and you're in the wrong directory, go back with cd ~/curriculum and confirm with pwd.
What you just learned
pwd- where you are
ls- what's here
echo- prints text (or redirects to a file)
cat- reads a file's contents
>- redirects command output to a file