# 3. Command line overview

# 3.1. What it is

Command line is the text input and output environment that allows us to process commands on the computer. We refer to these terminal instances as "windows"

# 3.2. Common commands

This will output your current working directory:

pwd
1

This will output whatever is passed into the terminal:

echo Hello World
1

This will output the contents of the directory you are in:

ls
1

We can also pass in the -a flag to show hidden files in the directory

ls -a
1

The cd command stands for change directory. This allows us to traverse the filesystem via the terminal. To go up a directory:

cd ..
1

To go into a directory replace <DirectoryName> with the actual directory name:

cd <DirectoryName>
1

The mkdir command stands for make directory. We can use this to create new folders:

mkdir testFolder
1

The touch command is used to create a new file. You can add any extension you want but for this example we are creating a txt file.

touch testfile.txt
1

The cat command is used to display the contents of a file.

cat testfile.txt
1

# Exercise

  1. Let's create a directory called Assessor
  2. Change directory to get into the Assessor directory
  3. Output your current working directory
  4. Create a file called example.txt
  5. Open the file example.txt and type something in there
  6. Back in the terminal display the contents of the example.txt file