Setting up your environment


A lot of the guides that I’m got on this blog have some basic prerequisites. For now I’m going to stick them in here, but as this site grows I might split them up. For now the main thing is to learn your way around terminal, and install homebrew.

This stuff isn’t rocket science, but when you’re first getting into coding and making stuff, setting up your environment is often the biggest hurdle.

Installing Homebrew

Homebrew is a package managment system that makes it easy to install command line interface (CLI) tools on your mac (or linux).

Installing homebrew is as simple as one command:

First, open Terminal on your mac. Type Spacebar and then start to type “Terminal” and then hit enter top open it.

Next copy and paste this into Terminal, and then hit enter.

/bin/bash -c "$(curl -fsSL"

This may take a little while, just let it run. When it finishes, you can now install various CLI tools. Most of my tutorials will have one or two of these dependencies that you need to install.

Tips for Using Terminal on Mac

There’s a couple things that make using Terminal on your mac a lot easier. Often times you’re going to want to paste into your terminal a specific file on your file system, but you don’t want to manually type that into terminal. Here’s a few tricks that can help.

  1. You can right click on any file on your mac, and press and hold option ⌥ to copy the whole file path for a file to your clipboard.
  2. Sometimes when writing a command in terminal, you’ll want to edit a certain part of what you’ve typed. You can press and hold option ⌥ and then click to insert your cursor. This makes it easy to paste in a file path into a command.
  3. If you’re writing out a terminal command and you change your mind, you can press control c to cancel back out of it instead of pressing and holding the backspace.
  4. When you’re in the terminal, you can press the “up” arrow key to go scroll back through commands that you’ve entered before.
  5. You can type history to see all the commands you’ve typed before. After a while it starts to only give you the first 100 commands, so you can type like history 1000 to give you everything you’ve ever typed into it.

Have some more essential tips? Let me know!

Leave a comment

Your email address will not be published. Required fields are marked *