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.

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 blog, test, and the file index.js 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.

Folder Icon

Sign up to start coding

Already have an account?