Log in from a computer to take this course

You'll need to log in from a computer to start Learn the Command Line. But you can practice or keep up your coding streak with the Codecademy Go app. Download the app to get started.

apple storegoogle store

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 “lists” all the files and directories inside of it. Be sure to type the letter l as in “List” and not the number 1.

In the terminal, the first thing you see is $. This is called a shell prompt. It appears when the terminal is ready to accept a command.

If we typed:

$ ls

the terminal would display our current directory’s files and directories:

2014 2015 hardware.txt

The directories 2014, 2015, and the file hardware.txt are the contents of the current directory.



In the terminal, after the $, type:


and press enter.

You should see the three items print out below the command.

Sign up to start coding

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?