Your First Steps with the Terminal
What is a Terminal?
Welcome to the Introduction to the Command Line Terminal course! While we won't actually be writing any code in this course, we'll learn tools that will help us interact with our code like programmers do.
You're already used to navigating your computer with visual cues and mouse clicks. The terminal presents a different paradigm, one where you interact with your computer using text commands. By communicating with text only, you can communicate with your computer more precisely.
There isn't just one "Terminal" application - each operating system has different terminal applications that can be installed and used.
The CodingCoursesOnline Terminal
This website provides a terminal that simulates what you might typically find on your computer, helping us focus on learning the core concepts without having to account for all the differences between each individual computer. It's a secure and easy way to learn online.
A terminal window overlaid on a graphical user interface
Your First Command: ls
All files on your computer are organized into folders. When you open the terminal application, you're dropped into some folder on your computer.
The ls
command is your window into the folder you're currently in. It's like asking "What files are in here?", and the command's output is the answer.
Let's try out the CodingCoursesOnline terminal now, which you can find by clicking the button below that says "Try the Programming Environment".
After clicking that button, try the following steps:
- Click where you see the
$
prompt - Type
ls
and press Enter
You should see:
- Files with their extensions (like
.txt
or.py
) - Folders marked with a trailing
/
- Everything organized in a clean list.
At the top of the terminal, you'll see a list of objectives (in this case, just one), that will be checked off as they're completed.
Why the ls command is so important
ls
is possibly the most commonly-used command because knowing what files are in your current folder is the first step to doing anything with them.
💡 Pro tip: Different systems may display folders in various ways (colors, symbols). We use
/
for consistency in this course.
Ready for the Next Step?
Now that you can list files in your current folder, let's learn how to determine which folder you're currently in.