Getting Started with the Terminal
The terminal can feel intimidating, but it's a superpower once you get the hang of it. Let's start by opening the terminal on your device:
- Mac: Open Spotlight Search (⌘ + Space), type "Terminal," and press Enter.
- Windows: Press the Windows key, type "Command Prompt" or "PowerShell," and press Enter.
- Linux: Open your applications menu and search for "Terminal."
Challenge 1: Where Are You?
Once your terminal is open, use a command to find out where you are. After that, list the other files and folders in your current location.
Hint: You've seen the commands to do this before in the Terminal Commands page.
Challenge 2: Create and Navigate
Next, create a folder for this workshop and navigate into it—all in
one line. Here's a tip: You can chain commands with ;
to
run them sequentially.
Hint: Use a combination of the commands to create a folder and change directories.
Double Hint: Use tab to autocomplete file names. Very useful feature.
Challenge 3: Files, Files, Files
Inside your workshop folder, create an index.html
file,
and a style.css
file. We'll be using these later. Now
list them, to make sure they exist.
Ok I lied. Now delete the files. Play around with deleting and adding
files. Say you had two .html
files, or 100. Could you
figure out a way to delete all of them at the same time?
Hint: Use wildcard operators to delete all files at once!
Challenge 4: Organize Your Workspace
Finally, move your now-empty workshop folder into the location where you keep your coding projects. If you don't have a dedicated folder for coding yet, now's a great time to create one!
Hint: Think about how to use a command to move a folder to a new location.
Final Check
Congratulations! Your terminal is warmed up, and your workspace is ready for action. You've practiced navigating, creating, listing, and deleting files and folders—all essential skills for any coder.
When you're ready, move on to the next page to create your GitHub account and continue the workshop.