

- Apple terminal sudo definition how to#
- Apple terminal sudo definition install#
- Apple terminal sudo definition software#
- Apple terminal sudo definition code#
The terminal is a really cool and powerful program, but we can harm our machine if we paste someone’s malicious code in there, so it’s important to understand what we’re doing.

Apple terminal sudo definition install#
Whoa! What’s that install command doing anyway? I’m a big proponent of understanding commands that you paste into your terminal before you run them. One of the important things it points out for us will be that the install script is going to create some subdirectories in the /bin/ directory. The cool thing about the Homebrew install script is that it will tell you what it’s going to do and prompt you for a yes or no before proceeding. This command is going to install Homebrew for us. We’re going to follow that by running this command in our terminal that we opened in step 1: /bin/bash -c "$(curl -fsSL )" The Homebrew homepage has the install information. Ironically, Homebrew is written in Ruby! Let’s get that installed.
Apple terminal sudo definition software#
Package managers will install software in a consistent manner and keep your computer tidy.Īs it turns out, macOS has an awesome package manager called Homebrew. In this case, managing means installing, updating, and removing software as needed. Hold on! What’s a package manager? A package manager is an application whose job is to manage software on your computer. Let’s do that by installing a package manager. But as good software engineers and system administrators, we like to stay on top of things and install the updated versions when we can. If you don’t need the latest and greatest Ruby version, you could stop here.

That means M1 Macs come with Ruby version 2.6 installed. The -v option tells the Ruby CLI to return the version of the Ruby installation to us.įor Mac M1, it returns the following: ruby 2.6.10p210 ( revision 67958) Here, we’re invoking the Ruby CLI and passing the option -v to it. Now let’s see which version of Ruby we have installed by typing in the following command: ruby -v If Ruby isn’t installed or available to us, the which command will let us know it couldn’t find Ruby. We passed Ruby as an argument, so the command is finding the Ruby executable location. The which command allows us to see where on the computer an executable file lives. We can see that by typing some commands into our terminal. Did you know that a version of Ruby comes installed on your Mac by default?

When you open a terminal (assuming zero configuration), you start at your home directory. Type terminal into the spotlight search.This brings up the macOS spotlight search, a search utility for opening apps on your Mac. You can quickly open the terminal by doing the following: The terminal application on macOS is an operating system command line interface (CLI) that comes installed on new Macs. TLDR-Run These Commands From the Terminal /usr/bin/ruby -e "$(curl -fsSL )"Įcho 'export PATH="/usr/local/opt/ruby/bin:$PATH"' > ~/.bash_profile 15 minutes (or just a few if you only need the commands).Administrator privileges (you should have this if you’re working on a personal device).Use the package manager to install Ruby.So let’s find out how easy it is to get up and running! What We’re Going to Do Ruby is known for being easy to learn and fun to use. While Ruby is used quite frequently for web development, it’s also popular as a scripting language. Created in 1996 by Yukihiro Matsumoto, Ruby became really popular in the late 2000s with the introduction of the Ruby on Rails web framework. Ruby is an open-source programming language with a strong developer focus. If you’ve done this sort of thing before and just need some directions, I’ve included a TLDR section showing what commands to run. So if you’re totally new, don’t worry! I’ll list each step and follow it with an “extra credit” section where I’ll explain that step in depth. Along the way, we’ll learn about the steps involved and various bits of knowledge required to get up and going.
Apple terminal sudo definition how to#
In this post, we’re going to show you how to install Ruby on your Mac.
