Apple, Tips and Tricks
  • Home
  • OSX Daily

Apple, Tips and Tricks

  • Home
  • OSX Daily
Latest News

homebrew

Command LinehomebrewMacMac OS XmacOSOSX DailyterminaltipsTips & Trickstricks

How to List All Homebrew Packages Installed on a Mac

written by applenws

Want to quickly see all Homebrew packages installed on a Mac? You may already know the path where Homebrew packages are installed to, but you don’t need to list a directory structure to get a list of Homebrew packages that have been installed in Mac OS.

Instead, you can issue a simple command to show a list of all Homebrew packages installed on a particular Mac. Additionally, you can issue a similar command to list all cask packages installed through Homebrew on the Mac too.

To be perfectly clear, we’re focusing on Homebrew packages that have already been installed on a particular Mac, not Homebrew packages that are simply available to install.

How to List All Homebrew Packages Installed on Mac

Homebrew includes a simple and convenient command to list all packages that have been installed through brew, the syntax is as follows:

brew list

Sample output may look something like the following, depending on what packages and their dependencies you have installed:

$ brew list
bash-completion gettext libidn2 pcre watch
cask glib libunistring pcre2 wget htop links python nmap irssi node smartmontools libffi openssl sqlite

You may have fewer or more brew packages installed, depending on your particular setup.

It can also be helpful to export the list of Homebrew packages that are installed into a text file, that can be done by redirecting the output of brew list into a plain text file like so:

brew list > homebrewpackages.txt

The output would be the same, but now its stored in the “homebrewpackages.txt” file which you could share with someone else or document for other purposes.

If you’re looking for some noteworthy packages, check out this list of some of the best Homebrew packages available for Mac users. If you’re a developer you might also be interested in getting node.js and nom along with installing the updated Python 3 package on a Mac.

How to List All Cask Homebrew Packages on Mac

The ‘brew list’ command covers just regular Homebrew packages, but you can also show a list of all cask packages too:

brew cask list

If you issue that command and nothing comes back, that simply means you have not installed any Mac apps through brew cask, which is not a terribly unusual situation as many Mac users just use Homebrew for command line tools and binaries and not for maintaining other Mac apps. Nonetheless cask remains a very popular method to easily install, maintain, and manage various Mac apps as well. It really just depends on the individual users particular setup.

As hinted in the introduction to this article, another method of finding what Homebrew packages are installed on a Mac by simply using the ls command to show where Homebrew packages are installed:

ls /usr/local/Cellar/

The output of that command will be every package installed through Homebrew, as they always end up in that directory by default.

How do I find what Homebrew packages are available to install?

Obviously we’re focusing on what Homebrew packages are currently installed on a Mac, but if you want a list of Homebrew packages that are available to install instead then you can use either of the following methods. The first approach uses a simple search command:

brew search

The output of ‘brew search’ will be every available Homebrew package that could be installed.

Or you can browse the brew formula page here for a full list of Homebrew packages that could theoretically be installed.

Do you know of other methods to get a list of all Homebrew packages installed on a Mac? Share your thoughts and experiences in the comments below!

Related

Source: OSX Daily

How to List All Homebrew Packages Installed on a Mac was last modified: October 20th, 2018 by applenws
October 20, 2018 0 comment
0 Facebook Twitter Google + Pinterest
Command LinehomebrewMacMac OS XmacOSOSX DailyterminaltipsTips & Trickstricks

How to Uninstall Homebrew from Mac OS

written by applenws

If you have previously installed Homebrew to a Mac and have now decided that you no longer need or want the command line package manager, you can uninstall Homebrew from MacOS and completely remove Homebrew and all installed packages and formula from the Mac.

This tutorial will walk through how to completely uninstall Homebrew from a Mac, meaning it will remove the entire package manager itself, along with removing the brew and cask commands, along with the various software packages that may have been installed. Notably, this is completely different from simply uninstalling individual packages with Homebrew, which is how you’d remove a particular formula from the package manager.

How to Uninstall & Remove Homebrew in Mac OS

There are a few ways to uninstall Homebrew and remove it from a Mac. Perhaps the simplest method is using a single command string entered into the Terminal, just as you run a ruby and curl command in the command line to install Homebrew, you also run a ruby and curl command to uninstall Homebrew from a Mac.

The single command to uninstall Homebrew is as follows:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

This uses ruby to execute the Homebrew uninstall script that is downloaded from github with the curl command. When executed properly, the uninstall script will run on the Mac and completely remove Homebrew.

Option 2: Uninstalling Homebrew with the Uninstall Script Manually

If you don’t like the idea of executing a script downloaded from the internet with curl (which is understandable for security conscious individuals), then you can also view, download, and review the uninstall script beforehand, and then execute it manually on the computer that you wish to remove Homebrew from.

The Homebrew uninstall script is located at the following URL:

https://raw.githubusercontent.com/Homebrew/install/master/uninstall

Save that file as a text document labeled “uninstall” or “uninstallhomebrew” or whatever you want to call it, and then execute the command as usual. Alternatively, you can run the uninstall script with –help flag to get more details and options:

./uninstall --help

Whether you use either method outlined above, Homebrew will be uninstalled. This will also remove any packages with it, but if you only want to uninstall certain formula and packages rather than Homebrew entirely you should instead focus on these instructions.

The last option, which we’re not going to cover here due to complexity and variability of each users configuration and what packages they have installed, is to manually delete all Homebrew directories, dependencies, formula, and all related files from the wide-ranging Homebrew directory locations, including removing every individual item in the Homebrew installed package location of the Mac. That’s a much more time consuming process, and you’ll be digging around in a variety of system level directories. This method is inappropriate for the vast majority of users – advanced or otherwise – and thus will not be covered. But if you’re curious, use the find, locate, and mdfind commands to discover all Homebrew, brew, cask, and Cellar related data on the Mac.

That’s about it, assuming you ran the Homebrew uninstall scripts the process is pretty straight forward and the removal is complete. Of course if you need and use Homebrew there is no reason to uninstall it, but if you happened to install Homebrew and later discovered it’s of no use to you, it’s perhaps relevant to remove it from your Mac.

Related

Source: OSX Daily

How to Uninstall Homebrew from Mac OS was last modified: August 12th, 2018 by applenws
August 12, 2018 0 comment
0 Facebook Twitter Google + Pinterest
Command LineftpFTP ServerhomebrewMacMac OS XmacOSOSX DailyterminaltipsTips & Trickstricks

How to Install FTP on MacOS Mojave & High Sierra

written by applenws

Mac command line users may have noticed that FTP is missing from the latest versions of MacOS system software, but despite ftp not being included in newer versions of system software by default, you can still install ftp on Mac OS if you need to use an ftp client or run an ftpd server for whatever reason.

For some quick background, modern versions of Mac OS pulled ftp to instead emphasize SFTP usage. Likewise, telnet was removed in favor of ssh. These decisions were probably made to favor the more secure encrypted protocols of SFTP (and ssh), but nonetheless some users may still need to regularly use the older ftp transfer protocol, even if it’s not particularly secure. Accordingly, certain Mac users may need to install and run ftp as a client, or ftpd as a server, which is who this tutorial is geared for. If you don’t need ftp, there’s no reason to install it.

How to Install FTP on MacOS

If you have not already installed Homebrew on the Mac, you will need to do so before beginning with this particular approach.

You have two options, one is to install inetutils (which also includes some other useful packages), or you can install tnftp. Either is achievable through Homebrew:

Installing ftp in MacOS with inetutils

The inetutils package includes ftp, the ftp server, along with telnet and telnet server, and the server and clients of rsh, rlogin, tfp, and more. If you want ftp, you very well may want this full suite, in which case installing inetutils through Homebrew is as simple as issuing the following brew command:

brew install inetutils

Once Homebrew completes installing the inetutils package, you can run the regular ftp command as usual, for example you can connect to the gnu.org ftp server to verify that all is working as expected:

ftp [email protected]

One of the obvious perks to installing ftp and ftpd server with inetutils is you get other helpful network utilities, so you won’t need to manually install telnet on the Mac if you need that, it will just come in the same package together.

Installing ftp through tnftp

To install only an ftp client, you can install tnftp on the Mac. With homebrew you can accomplish this with the following brew command:

brew install tnftp

Additionally, if you want the tnftpd server you can use the following command:

brew install tnftpd

Whether you want to install the full inetutils package, or tnftp alone, is entirely up to you and your specific needs and requirements.

FTP was removed in macOS High Sierra and macOS Mojave, but ftp and ftp server do remain in older versions of Mac OS and Mac OS X system software, even if the ftp server has to be manually activated with launchctl. In some older versions of Mac OS, you can even connect with ftp from the Finder however. Meanwhile, newer versions of Mac OS include native options to use SSH & SFTP server for remote logins

Alternatively, get ftp by compiling inetutils

Finally, another option is to compile inetutils from source if you prefer that approach, which you can get here from gnu.org. You’ll need the Mac OS command line tools installed, then unpack the tarball, run configure, make and make install:

tar xvzf inetutils-1.9.4.tar.gz
cd inetutils-1.9.4
./configure
make
sudo make install

And then you’re good to go with ftp, telnet, and the other network tools, all by compiling them from scratch.

If you have another solution to getting FTP and an FTP server on a Mac (and no, not SFTP which is different and already included), share with us in the comments below!

Related

Source: OSX Daily

How to Install FTP on MacOS Mojave & High Sierra was last modified: August 7th, 2018 by applenws
August 7, 2018 0 comment
0 Facebook Twitter Google + Pinterest
Command LinehomebrewMacMac OS XmacOSOSX DailyterminaltipsTips & Trickstricksuninstall

How to Uninstall Packages with Homebrew

written by applenws

If you have installed Homebrew on a Mac to use as a package manager for various unix and command line utilities, you’ve probably also installed a handful of packages deemed useful to you. But what if you no longer need one, and you want to remove a particular Homebrew package?

It turns out that uninstalling packages / formula with Homebrew is very easy, and uninstalling and removing packages from Homebrew is just as easy as installing them in the first place.


To be clear, we’re not talking about uninstalling Homebrew itself, we’re just talking about removing particular packages from Homebrew.

How to Uninstall & Remove Homebrew Packages

The proper way to remove a Homebrew package is with the uninstall or remove command.

The uninstall Homebrew package command looks like this:

brew uninstall packageName

The remove Homebrew package command looks like this:

brew remove packageName

As you may have guessed by now, the remove and uninstall commands are exactly the same, and get the same result; the removal of the Homebrew package.

For example, to remove and uninstall Telnet (assuming you installed telnet on the Mac with Homebrew anyway), you would use the following command string:

brew uninstall telnet

Or you can use the remove command for the same effect:

brew remove telnet

Removing a package from Homebrew is quick, as there is no need to download anything, it just deletes the Homebrew package from the Mac.

You can confirm the package was removed by trying to run the command again, or by checking where Homebrew packages are installed to and you will find the package you removed is no longer there.

Additional Homebrew Package Uninstall Options

There are two flags you can pass to the Homebrew uninstall command as well; –force and –ignore-dependencies.

The –force flag (or -f) will forcibly remove the package along with deleting all versions of that package / formula.

The –ignore-dependencies flag does just what it sounds like, it will ignore dependencies for the formula in question when uninstalling the designated package.

Managing Dependencies when Uninstalling Homebrew Packages

One thing to be mindful of when removing and uninstalling packages from Homebrew is that if the package being uninstalled has dependencies that are in use by another package or formula, then that may break it causing the secondary package to no longer work correctly. Perhaps the simplest way to prevent that is to use the optional –ignore-dependencies flag. For example:

brew uninstall --ignore-dependencies telnet

If you are not sure what dependencies exist with a particular Homebrew package, you can use the deps command to find that out:

brew deps packageName

For example, if you installed python3 on the Mac using the Homebrew approach, which has a fair amount of dependencies, running that command would look something like the following:

% brew deps python3
gdbm
openssl
readline
sqlite
xz

Since many other packages also use those dependencies, if you were to remove python3 you’d almost certainly want to issue the –ignore-dependencies flag. The same applies to node.js and npm, and many other popular Homebrew packages.

Do you know of any other methods or tips related to uninstalling Homebrew packages and formula? Share with us in the comments below!

Related

Source: OSX Daily

How to Uninstall Packages with Homebrew was last modified: July 29th, 2018 by applenws
July 29, 2018 0 comment
0 Facebook Twitter Google + Pinterest
Command LinehomebrewMacMac OS XmacOSOSX DailyterminaltipsTips & Trickstricks

How to Find Where Homebrew Packages Are Installed on Mac

written by applenws

Have you ever wondered where Homebrew puts the binaries from brew packages that are installed on a Mac? If you’re a Homebrew user, you may be interested in knowing where Homebrew puts everything and where to find the installed brew packages in Mac OS.

We’ll show you the directory path where Homebrew keeps packages, and also share a few other ways to see what and where Homebrew has installed anything onto a Mac.


This is obviously aimed at more advanced Mac users who rely on the command line and Homebrew, and this won’t be applicable to anyone else. If you’re interested in installing Homebrew you can learn about that here.

Where Homebrew Packages Are Installed on Mac OS: the Homebrew Installation Path

By default, Homebrew will install all packages into the following directory in all versions of Mac OS:

/usr/local/Cellar/

Additionally, Homebrew places symlinks into the following directory path:

/usr/local/opt/

The symbolic links of binaries found in /usr/local/opt/ all point to their respective package in /usr/local/Cellar/ as can be confirmed with ls and the -l flag:

ls -l /usr/local/opt/

The screenshot example demonstrates the symbolic links pointing from /usr/local/opt/ to /usr/local/Cellar/ for each individual brew package:

Where Homebrew packages are installed on a Mac

Thus you can use the ls command to list all Homebrew packages installed on a Mac simply by showing the full directory listing:

ls /usr/local/Cellar

How to Find Specific Homebrew Package Installation Information

Now that you know where Homebrew generally stores packages, you can also learn more specifics about particular packages. We’ll show you a few commands to print the exact path of a specific brew package, and also show you how to get additional detailed information about particular Homebrew packages installed on the Mac.

How to Find Exactly Where a Homebrew Package is Installed

If you want the exact path to where a Homebrew package is installed reported back to you via command line, the simplest method is to use the –prefix flag and point it at a particular Homebrew package on the Mac, this will reveal the location where it is installed:

brew --prefix [package]

For example, using the package ‘wget’ we can get the following information immediately:

$ brew --prefix wget
/usr/local/opt/wget

As you can see in the command output, only the installation path for that Homebrew package is shown.

How to Get Detailed Homebrew Package Information

If you’re interested in getting more detailed information about a specific Homebrew package that has been installed, including where the Homebrew package came from, what it is, when it was installed, the path where the brew package is installed, as well as information about that packages dependencies and what other packages are required to use it. This is achieved by using the ‘info’ flag with brew to point it at a specific package, using the following syntax:

brew info [package]

For example, if you wanted to get information about the Homebrew package “wget” then you would issue the following command:

brew info wget

Hitting return will detail information about the brew package. Example output of such a command for ‘wget’ may look like the following:

$ brew info wget
wget: stable 1.19.5 (bottled), HEAD
Internet file retriever
https://www.gnu.org/software/wget/
/usr/local/Cellar/wget/1.19.4_1 (50 files, 3.8MB) *
Poured from bottle on 2018-05-07 at 10:59:31
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/wget.rb
==> Dependencies
Build: pkg-config
Required: libidn2, openssl
Optional: pcre libmetalink gpgme
==> Options
--with-debug
Build with debug support

How to get Homebrew package information and installation path on Mac

The ‘brew info’ command obviously reveals significantly more information than simply the installation path of the package, so if you simply want the exact path of an installed brew package the –prefix command may be easier for scripting or other purposes. Nonetheless the full ‘brew info’ command output is incredibly useful to get extensive information about any installed package and it has obvious value for that reason, in addition to showing where something is installed.

Try these commands yourself with any Homebrew package. If you followed our prior articles about installing Homebrew on the Mac and then checked out some of the popular Homebrew packages available, or perhaps updated to Python 3 or installed node.js and npm through Homebrew, these tips will work to show you the installation path of those packages, as well as other noteworthy package information.

Do you have interesting advice or information to share on finding where Homebrew installs packages onto a Mac, or retrieving package details? Share with us in the comments below!

Related

Source: OSX Daily

How to Find Where Homebrew Packages Are Installed on Mac was last modified: July 5th, 2018 by applenws
July 5, 2018 0 comment
0 Facebook Twitter Google + Pinterest
Command LineDevelopmenthomebrewMacMac OS XmacOSnodejsnpmOSX DailyterminaltipsTips & Trickstricks

How to Install Node.js and NPM on Mac OS

written by applenws

Node JS is the popular Javascript runtime environment that is widely used by many developers, and npm is the accompany package manager for the Node.js environment and Javascript. When you install Node.js, you will find npm is installed as well, thus if you want npm you need to install NodeJS.

There are several ways to install Node.js and NPM on the Mac, including using a prebuilt packaged installer, or by using Homebrew. This tutorial will cover both, and either approach should work find on any modern version of MacOS system software.

How to Install Node.js and npm on Mac OS with Homebrew

The easiest way to install node.js and npm is with the Homebrew package manager, which means first you will need to install Homebrew on the Mac first if you have not done so already. It’s always a good idea to update Homebrew before installing a Homebrew package, so run the following command to do that:

brew update

Assuming you already have Homebrew on the Mac, then you can run the following command into the Terminal application to install both Node.js and npm:

brew install node

Installing NodeJS / NPM via Homebrew is arguably easier than using any other method, and it also makes it simple to keep node.js and npm updated. It also has the added benefit of making it relatively simple to uninstall down the road if you decide you no longer need it.

Installing Node.js & NPM on the Mac with a package installer

If you don’t want to use Homebrew for whatever reason, the other next easiest option is to use a the prebuilt installer from nodejs.org:

You can run the installer like any other installation package on the Mac.

How to Check if NPM and Node.js are installed on a Mac

After you have installed node.js with npm, you can confirm that the two are installed by issuing either command with a -v flag to check the version:

node -v

and

npm -v

How to Test that Node.js is Working

Once the node.js package is installed on the Mac you can test it’s working by starting a simple web server. Create a file named “app.js” that contains the following code syntax:

const http = require(‘http’);

const hostname = ‘127.0.0.1’;
const port = 3000;

const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader(‘Content-Type’, ‘text/plain’);
res.end(‘Hello from NodeJSn’);
});

server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});

Save that app.js file to the current directory, then you can start the web server with the following command:

node app.js

Then launch a web browser (your default or otherwise) and go to the following URL:

http://localhost:3000

You should see a message stating “Hello from Node.js”.

That simple node.js web server is sort of like the python instant web server except of course it’s using node rather than python. Speaking of Python, if you’re installing Node.js and NPM you may also be interested in instilling the updated Python 3 on a Mac too.

You can also install and use Grunt CLI task runner to test node and npm, which can be installed through npm:

npm install -g grunt-cli

You can then run ‘grunt’ from the command line.

That should just about cover the basics of installing NodeJS and npm on a Mac. If you have any other tips, tricks, suggestions, or advice, feel free to share them in the comments below.

Related

Source: OSX Daily

How to Install Node.js and NPM on Mac OS was last modified: June 29th, 2018 by applenws
June 29, 2018 0 comment
0 Facebook Twitter Google + Pinterest
Command LinehomebrewMacMac OS XmacOSOSX DailyterminaltipsTips & Trickstricks

9 of the Best Homebrew Packages for Mac

written by applenws

If you’re an advanced Mac user who spends a considerable amount of time at the command line, you likely have Homebrew installed by now. So, how about sharing a list of some of the best Homebrew packages available for Mac users?


We’ve discussed Homebrew many times before, but essentially it makes installing additional command line tools easier than ever, as there is no compiling necessary and it handles dependencies for you. Even if you don’t have Homebrew installed, this list of some of the more helpful Homebrew packages and tools may inspire you to get Homebrew on your Mac.

To get any use from this list you’ll want to be a reasonably advanced command line user, and you’ll obviously need to install Homebrew on the Mac if you haven’t done so yet. Then you’re ready to go and enjoy the collection. And don’t forget to share your own favorite Homebrew packages in the comments too.

In no particular order, here are some of the top Homebrew packages for Mac:

cask

Cask allows you to easy install Mac OS GUI apps and binaries directly from the command line using Homebrew. First you install cask, and then you can install normal Mac apps directly from the command line.

brew install cask

For example, once you have cask, if you want to install Chrome from the command line, then Cask can do that with with a command like the following:

brew cask install google-chrome

Or maybe you want to install iterm2 so you can have that cool drop-down command line available from anywhere:

brew cask install iterm2

Cask can install tons of applications in Mac OS without needing to download them individually from various websites and then going through the typical drag-and-drop install routine.

Note that Cask has some limitations, for example it can’t install anything from the Mac App Store, and Cask is not able to install software updates to the Mac like the ‘softwareupdate’ command is able to, but that doesn’t make it any less useful of a tool for advanced Mac users.

htop

htop is a system resource monitor for the command line. htop is basically a superior version of ‘top’, with a nice visual indicator of process activity, CPU activity, memory usage, load average, and process management. You can kind of think of it like Activity Monitor for the command line, though many command line users would argue it’s even more useful than Activity Monitor is.

brew install htop

We’ve discussed installing htop on the Mac before, it’s really a fantastic tool that deserves to be a part of any command line toolbox.

wget

wget can download data from the web and ftp, making it one of the best tools out there to download anything via the command line. Whether you want to download just a single file from somewhere, or you want to download an entire directory or even mirror a full website, wget can do it for you.

brew install wget

You can also install wget without Homebrew, but if you’re reading this article you likely already have Homebrew.

nmap

nmap is a top notch network security scanner. It can find network assets, discover services and hosts on local networks, perform port scans, map a network (hence the name), detect operating systems and versions of software on clients and servers, and so much more. It’s an excellent tool for systems administrators, network admins, security researchers, and anyone else who needs to dabble in network scanning activity.

brew install nmap

You can also get nmap for Mac as a disk image in a self contained binary if you’d rather not deal with home-brew, but again, we’re talking about homebrew here.

Oh and if the concept of nmap appeals to you but the command line is far over your head or too cumbersome, then you can use Network Utility on Mac OS to perform port scans, finger, whois, trace route, ping, and much more, all from a friendlier GUI app.

links

links and lynx are command line web browsers, allowing you full web access (well, as long as there’s text to navigate) from the command line. This is useful for many reasons whether researching and web browsing from a terminal window, or even for testing web site functionality and compatibility with alternate browsers and for alternate use cases. I’m partial to ‘links’ but ‘lynx’ is good too, or you can install both.

brew install links

We’ve discussed lynx before macports, and you can also get lynx with image support if you’re interested, but again if you have Homebrew installed then it’s a piece of cake to install through the command line.

geoiplookup

geoip gives you geolocation data for an inputted IP address. This is useful for network and systems administrators, web workers, security researchers, and much more.

brew install geoip

If you ever wondered where a particular IP is located in the world and to what ISP it belongs, then geoip is for you.

irssi

Do you like to chat on IRC? Want to be told to ‘rtfm’ when you ask a question in #linux? Then irssi is for you, because it’s arguably the best irc client for the command line (or perhaps in general, sorry ircii, mirc, and ircle).

brew install irssi

/join away!

bash-completion

If you use the bash shell, then bash-completion is likely something you’re either familiar with or soon will be since it dramatically improves command completion and is programable. Personally I’m partial to zsh which also has great completion capabilities, but bash-completion makes bash much more useful, so if you’re a bash fan then check it out if it sounds appealing to you.

brew install bash-completion

Oh and this probably goes without saying but if you changed your shell at some point in Terminal app then you’d want to use bash to get any use out of bash-completion.

watch

The watch command is super useful to keep a continuous eye on another process. For example you can use watch to track disk usage or IO, or virtual memory usage, or anything else, updating the command output every few seconds. This is one of those great tools for administrators but it’s useful for many other purposes too.

brew install watch

Home-brew isn’t the only approach for watch, you can also install watch on Mac OS using MacPorts, from source, or as a precompiled binary too.

What do you think? Do you have any particularly favorite Homebrew packages? Share your own top Homebrew packages, tricks, installs, and add-ons in the comments below!

Related

Source: OSX Daily

9 of the Best Homebrew Packages for Mac was last modified: March 26th, 2018 by applenws
March 26, 2018 0 comment
0 Facebook Twitter Google + Pinterest
Command LinehomebrewMacMac OS XmacOSOSX DailyterminaltipsTips & Trickstricks

How to Install Homebrew on Mac

written by applenws

Advanced Mac users may appreciate using the Homebrew package manager, which greatly simplifies the process of installing command line software and tools on a Mac.

For example, if you want to easily install favorite command line tools on a Mac like cask, htop, wget, nmap, tree, irssi, links, colordiff, or virtually any other familiar unix command line utility, you can do so with a simple command. Homebrew downloads and builds the package for you.


This is obviously aimed at more technically savvy Mac users who spend a lot of time at the command line. While there’s no particular issue for novice users installing Homebrew on their Mac, the odds of novices finding it useful are slim, unless they intend to embark on learning the command line environment. Contrast that to power users who practically live in a terminal environment, whether longtime Mac users or migrating to the platform from the Windows or Linux world, who will immediately see the value of Homebrew.

Requirements for Installing Homebrew on Mac OS

prerequisites to installing Homebrew on a Mac include the following:

  • A Mac running Mac OS X 10.10 or later, though earlier versions are sort of supported
  • Command Line Tools must be installed on the Mac (either independently or through Xcode)
  • Knowledge of the command line and using bash or zsh

Assuming you’re interested in installing Homebrew and meet those requirements, then the rest is equally straight forward.

How to Install Homebrew on Mac OS

The simplest way to install Homebrew is through ruby and curl, accomplished with a single command. This approach is the same for installing Homebrew in all supported versions of Mac OS and Mac OS X.

  1. Open the “Terminal” application, found in /Applications/Utilities/
  2. Enter the following command into a single line of the terminal:
  3. /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    Installing Homebrew on Mac

  4. Hit Return and you’ll see a series of lines about what the script will install and where, hit Return again to agree or hit Escape to cancel
  5. Enter the administrator password (required by sudo execution) to begin installation

Installation of Homebrew will take a while depending on the speed of your Mac and internet connection, as each necessary package is downloaded and installed by the script.

When complete, you will see an “Installation successful!” message.

Homebrew successfully installed on Mac

Now you’re ready to install software packages through Homebrew, or you can read the help documentation with the following command:

brew help

Homebrew help on Mac

Installing Software Packages through Homebrew on Mac

Installing packages with Homebrew is super easy, just use the following syntax:

brew install [package name]

For example, to install wget through Homebrew you could use the following syntax:

brew install wget

Simple, easy. Once complete you can run wget as usual.

Installing a package with Homebrew on Mac

A quick side note; Homebrew is not the only way to install command line software, you can install command line tools on a Mac yourself and then compile and make software independently. For example, we discuss installing wget on Mac OS without Homebrew here and it uses the typical configure and make process. There’s nothing wrong with that approach (and arguably it might be preferable for users who want limited packages and a slimmer footprint) but if you’re accustomed to a package manager like dpkg, apt-get, or rpm you’ll almost certainly appreciate and prefer to use Homebrew.

How to Disable Hombebrew Analytics Tracking

Homebrew now defaults to using anonymized behavioral analytics tracking. If you do not want to participate in that or you’d just rather disable the feature to reduce network traffic or for privacy purposes, or whatever other reason, you can run the following command after successfully installing Homebrew on a Mac. This will opt out of Homebrew analytics:

brew analytics off

Hit return and after a moment or so the analytics tracking in Homebrew will be disabled.

How to Remove HomeBrew from a Mac

If you have installed Homebrew but later decide you want to remove Homebrew from a Mac for some reason or another, you can uninstall it with another ruby script run from the command line:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

Alternatively, you could download that “uninstall” script directly and run it yourself.

Enjoy Homebrew!

Related

Source: OSX Daily

How to Install Homebrew on Mac was last modified: March 7th, 2018 by applenws
March 7, 2018 0 comment
2 Facebook Twitter Google + Pinterest

Latest Apple Tips and Tricks

  • How to Check What Mac OS Version is Running on a Mac February 16, 2019
  • How to Stop iPhone and iPad Apps From Updating Automatically February 16, 2019
  • How to Update iOS Automatically on iPhone or iPad February 15, 2019
  • 4 Ways To Type Superscript and Subscript On a Mac (MacMost #1853) February 15, 2019
  • How to Make Text Size Much Larger on iPad February 14, 2019
  • Using and Customizing iPhone iCloud Backup (MacMost #1852) February 14, 2019
  • How to Fix App “is damaged and can’t be opened. You should move it to the Trash” Error on Mac February 13, 2019
  • How to Enable Stacks in MacOS to Clean Up Messy Desktops February 12, 2019
  • Using SVG Graphics In Pages and Keynote (MacMost #1850) February 12, 2019
  • How to Attach a Tile Tracker To Your AirPods February 11, 2019
  • How to Disable Autocorrect in Microsoft Word for Mac February 11, 2019
  • Creating Animation With Keynote Magic Move (MacMost #1849) February 11, 2019
  • How to Send Animoji or Memoji in Apps like WhatsApp on iPhone February 10, 2019
  • How to Enter Recovery Mode on iPad Pro (2018) February 10, 2019
  • How to Setup a WyzeCam Security Camera with Motion Detection Alerts Sent to Your iPhone February 9, 2019
  • How to Post Instagram Stories Longer Than 15 Seconds on iPhone At One Go February 9, 2019
  • How to Bypass “Safari no longer supports unsafe extension” Error in Mac OS Mojave February 8, 2019
  • 4 Common Mistakes Mac Users Make When Trying To Search For Files (MacMost #1848) February 8, 2019
  • How and When To Type En and Em Dashes On a Mac (MacMost #1847) February 7, 2019
  • How to Enter DFU Mode on iPhone XS, iPhone XR, iPhone XS Max February 6, 2019

Archives

Categories

Apple tips and tricks


Back To Top