Key Concepts

Review core concepts you need to learn to master this subject

ls List

$ ls Desktop resume.pdf photo.png

The shell command ls is used to list the contents of a directory. If no arguments are given, it will list the contents of the current working directory.

Navigation
Lesson 1 of 1
  1. 1
    The command line is a text interface for your computer. It’s a program that takes in commands and passes them on to the computer’s operating system to run. From the command line, you can navig…
  2. 2
    A filesystem organizes a computer’s files and directories into a tree structure: 1. The first directory in the filesystem is the root directory. It is the parent of all other directories and fil…
  3. 3
    The first command we’re going to look at is ls. A command is a directive to the computer to perform a specific task. When you type ls, the command line looks at the directory you are in, and then…
  4. 4
    The next command we’re going to look at is pwd, which stands for “print working directory.” It outputs the name of the directory you are currently in, called the working directory. Here the wor…
  5. 5
    Our next command is cd, which stands for “change directory.” Just as you would click on a folder in Windows Explorer or Finder, cd switches you into the directory you specify. In other words, cd ch…
  6. 6
    Instead of using cd twice in order to move from 2015 to memory, we can use it once and give it a longer argument: $ cd jan/memory To navigate directly to a directory, use cd with the dir…
  7. 7
    Now that we can traverse the existing filesystem, let’s try editing it by making directories (folders) through the command line. The command for that is mkdir: $ mkdir media The mkdir command st…
  8. 8
    Now we know how to create directories through the command line, but how do we create new files? We can do this using the command touch: $ touch keyboard.txt The touch command creates a new fil…
  9. 9
    Now that we’ve covered the basics of navigating your filesystem from the command line, let’s look at some helpful commands that will make using it easier! clear is used to clear your terminal, wh…
  10. 10
    Congratulations! You’ve learned five commands commonly used to navigate the filesystem from the command line. What can we generalize so far? * The command line is a text interface for the comput…

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo