Navigate Your File System

Introduction

The command line is your key to gaining more fine-tuned control of your computer. Many of the computer programs you build will be tested on the command line, so a knowledge of its basic commands is essential. If you've never used the command line before, you might feel intimidated at the prospect of doing so. Don't be frightened! You will not destroy your computer by practicing along with these videos and exercises! If you ever type a command on the command line that seems to be doing something you don't like, or is taking too long, just hit CTRL + c to quit that command.

In this first lesson, we'll look at how to move around your file system and the concept of the "relative path". Some of the commands we'll learn are:

  • pwd
  • ls
  • -a
  • -l
  • -la
  • cd
  • .
  • ..
  • ~

Important!

Note that for Windows Git Bash users, a few of these commands will be different or may not work at all. When that is the case, there will be a note to that effect on the lesson page where you first learn the command. Another note for Windows Git Bash users: follow the Linux/OSX instructions in the Command Line Crash Course exercises below. Do NOT follow the Windows instructions there. Because you are using Git Bash, which is Unix-based, the commands you use will be discussed in the Linux/OSX sections.

Exercises

For the exercises in this module, you'll use the excellent resource Command Line Crash Course from the book Learn Python the Hard Way. Follow his instructions to make flash cards and do all the "Do More" exercises he includes.

For this lesson, read the Introduction in Command Line Crash Course and work through Exercises 1, 2, 3, 5, and 6.

Back to Command Line Lesson Menu