Web browsers have evolved into do-it-all devices, but they’re not always the fastest or most efficient tools for the job. The built-in macOS command line, on the other hand, is all about efficiency and speed.
I’ve made a concerted effort over the years to embrace the power of the Terminal, and you should too. In fact, you could be reading this article right now from the command line.
7
Download and Install Software
By far the most common reason I turn to the Terminal app is to install software. I do this with the aid of the excellent macOS package manager, Homebrew. You can think of Homebrew as a big collection of applications and utilities, each of which can be installed quickly with a single command. Since many of the uses below are reliant on Homebrew downloads, it makes sense to install it first.
Open the Terminal and paste the following, then hit Return to run it:
/bin/bash -c "$(curl -fsSL
Enter your admin password, followed by Return, then wait for Homebrew to install. To finalize the installation, first run:
echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> /Users/$USER/.zprofile
And now finish it off by running:
eval $(/opt/homebrew/bin/brew shellenv)
Congratulations, you now have Homebrew installed. From here, you can use the brew
command to see what’s possible. I’d recommend running brew update
first so that your list of available apps is current.
Homebrew allows you to download casks and formulae. Casks are applications like any other on your Mac. They have a graphical user interface (GUI) and you’ll find them in the Applications folder. An example would be the web browser firefox
or the note-taking app simplenote
.
Formulae are command-line tools, which you’ll need to invoke using a command in a Terminal window. An example would be the versioning tool git
or container manager docker
. These won’t be showing up in your Applications folder. You can see a full list of everything you have installed by running brew list
.
To install something using Homebrew, simply type brew install
. Whenever I see a free tool on the web that I want to download, I turn to Homebrew first of all. This lets me skip the manual download process, avoid mounting DMG files, and Homebrew even takes care of leftovers by deleting them for you.
Most of the things I download via Homebrew were discovered while browsing the web, in forum posts, or through guides. Sometimes, however, I like to search the Homebrew archives for suitable tools. You can do this using the brew search
command, which searches the repository for any casks and formulae names that match the query.
But this isn’t exhaustive, since not all tools are named according to their primary function. Fortunately, Homebrew includes a short description with each app, and you can search that to get a better cross-section of tools. To do this, use the following command:
brew search --desc --eval-all
The --eval-all
flag simply tells Homebrew to search the entire catalog. For example, to find a full list of tools relevant to YouTube, I replaced
with youtube
. I then use brew info
to get more information.
5
Run an Internet Speed Test
Sometimes it’s a good idea to test your connection speed, whether you suspect your service provider is letting you down or you’re testing router placement for best results. I used to turn to Ookla’s Speedtest website for this, but the sad irony is that this process feels quite slow (and the site is plastered in advertisements). That’s where speedtest-cli
comes in.
First, run the following command to install the formula using Homebrew:
brew install speedtest-cli
You can now run a speed test whenever you want by executing speedtest-cli
in a Terminal window. This will run a simple speed test which automatically detects the nearest server to calculate your download and upload speed, plus ping. Append -help
to see an exhaustive list of flags you can use for more options.
4
Download Full macOS Installers and IPSWs
You don’t need Homebrew for this one, since the command is built into macOS. This can come in handy if you want to grab a full installer for macOS without using the web or built-in software update tools. It’s especially handy if you want to deploy the installer on a computer other than the one you’re currently using, or if you want to grab an earlier version of a macOS installer.
To get started, execute the following command:
softwareupdate --list-full-installers
You should see a list of all available installers. If you’re looking for a beta installer, make sure you’ve enrolled your device in Apple’s beta program and enabled the beta update channel under System Settings > General > Software Update (then try again; sometimes a restart is necessary).
You can now download the relevant version using the version number, like so:
softwareupdate --fetch-full-installer --full-installer-version 26.0
This will place the relevant full installer application inside your Applications folder, so you can run it or send it elsewhere.
Still can’t get the beta software to download? Make sure you’re running the latest stable version of macOS by switching the beta updates off, updating, then switching them back on.
If you’re looking for IPSW image files instead, so that you can install macOS inside a virtual machine, you can use a command-line tool called ipsw
. To get started, install it using the following Homebrew command:
brew install ipsw
From here, you can run ipsw
to see a list of available commands and flags. To cut to the chase, here’s the command to list all available macOS images:
ipsw download macos
From here, you can use the arrow keys to select an installer. Note that this includes beta versions plus deprecated versions of macOS.
3
Download Videos and Images
It’s not necessarily easy to download videos that are embedded in web pages. Sometimes you can right-click and save, other times you’re left relying on potentially shady browser extensions that swallow up RAM and require access to all of your browsing activity in order to work. That’s why I use a free command-line tool called yt-dlp
for this purpose.
Download it by running the following command:
brew install yt-dlp
Basic usage involves a simple command like:
yt-dlp -P path/to/folder/ "URL"
For some websites, you’ll need to be a little more specific. Take YouTube, for example, which defaults to a particularly low-quality video when you use this command. Instead, you can specify the resolution like this, which downloads a 1080p file instead:
yt-dlp -P path/to/folder/ "URL" -S res:1080
Naturally, the resolution you choose is contingent on the video supporting it.
Similarly, the gallery-dl
utility works in much the same way for mass image downloads. Get started by downloading it using Homebrew:
brew install gallery-dl
You can now use it to download entire galleries’ worth of images from supported websites using a command like:
gallery-dl -D "path/to/folder/" "URL"
2
Browse the Web (Sometimes)
It would be disingenuous of me to claim that I primarily use the Terminal to browse the web instead of using a web browser. I’d estimate that 98% of my web browsing is done in Safari, 1% in Firefox, and the other 1% takes place in a browser called Links. This is an actively maintained web browser that runs in the Terminal, and you can install it via Homebrew by running the following:
brew install links
You can then run the browser by executing the links
command, or better still, use links howtogeek.com
to browse a website directly. This is a severely stripped-back web browsing experience, but one that works just fine for most websites. You won’t see images, which means you won’t see most of the web’s advertisements either. Forget about watching videos or viewing images; this is a text-only browser that reduces a web page to its most basic form.
Links is capable of running in graphics mode, where images can be displayed, but the version of the browser in the default Homebrew repository doesn’t support this. Check out the Links home page for more information.
You can use your mouse while browsing the web with Links, so you can click on hyperlinks and use a menu that appears at the top of the screen (Hit Esc to reveal it). It’s great for cutting through busy websites, but it’s even better as a fun way to browse the web when combined with a Terminal emulator like cool-retro-term (also available via Homebrew).
1
Manage Large Downloads
There are a few ways to download a file using the command line, but my preferred method is using wget
. As ever, the easiest way to download this is to use the following Homebrew command:
brew install wget
You can then use the wget
command to download a single file, mirror an entire website, download an entire directory, and more. Simply append the wget
command with what you want to download. Check out our full guide to using wget for more tips like continuing downloads, limiting download speed, and downloading a list of files.
Alternatively, you could also call upon a download accelerator like axel
, also available via Homebrew:
brew install axel
Now use the axel
command followed by a list of URLs to download a single file from multiple sources.
Looking for more Homebrew apps? Check out the essential Homebrew apps I install on every Mac. Command line puts you off? Homebrew has a GUI in the form of Cork, too.