First Steps#

Notes from @audreyfeldroy / @ProfessorTerrence walkthrough Friday, 2023-10-06.

Introducing the Terminal#

The terminal is a text-based interface to your computer. It is a program that takes commands from the keyboard and gives them to the operating system to perform.

Coders use it to:

  • Install tools like Homebrew, Python, FFmpeg, and Git

  • Run scripts and programs

Sometimes it is called the command line, or the shell, or the command prompt. All of these are referring to the same thing.

Let’s practice using the terminal by opening it and running some commands.

Opening the Terminal#

Mac#

Open the Terminal app by searching for it in Spotlight.

Windows#

Open the Git Bash app by searching for it in the Start Menu.

Linux#

Open the Terminal app by searching for it in the Applications menu.

Running Commands#

Try running the following commands in the terminal to see what they do:

ls -asl
pwd
cd data/

Then paste the command and output into your chat LLM and ask what happened.

Install Homebrew#

Mac#

First install the Homebrew package manager by following the instructions at brew.sh.

It will ask you to run a command in the terminal. Copy and paste the command into the terminal and press enter.

If you’re curious what this command does, you can paste it into explainshell.com or a chat LLM to learn more. Try it, it’s fun!

You may be asked to enter your password. If so, enter your password and press enter. You won’t see anything appear on the screen as you type your password. This is normal.

You may be asked to install the Xcode Command Line Tools. If so, click Install.

Install Python 3#

Then install Python 3 by running the following command in the terminal:

brew install python

Check that Python 3 is installed by running the following command in the terminal:

python3 --version

Try running the interactive Python 3 interpreter by running the following command in the terminal:

python3

You will see the prompt change to >>>. This means you are in the interactive Python 3 interpreter. You can type Python 3 code here and it will be executed immediately. Try executing these little Python code snippets:

2 + 2
print('Hello, world!')
print(3 + 5)

To exit the interactive Python 3 interpreter, type exit() and press enter.

If any of these steps failed, ask for help:

  • First, try telling an LLM like Poe.com or Open Assistant what you tried and what happened.

  • If that doesn’t work, ask for help in the #help channel in Discord