Using Homebrew
The brew command performs all Homebrew
operations: searching for software, installing it, updating it,
uninstalling it, and more. Let’s demonstrate its use by installing a
package.[31] Suppose you want a command to work with MP3 files,
displaying and modifying the artist and title information inside them,
known as ID3 tags. We use Homebrew to search for
any packages with “id3” in their names:
➜ brew search id3
id3lib id3tool id3v2 libid3tagAfter some web research, you determine that
id3tool is the program you want. To install it, run
the brew install command:
➜ brew install id3tool
==> Downloading http://nekohako.xware.cx/id3tool/...
##########################################################
==> ./configure --disable-debug --prefix=/usr/local/...
==> make install
/usr/local/Cellar/id3tool/1.2a: 6 files, 40K,
built in 2 secondsThat’s it! The id3tool command is now
installed, which you can confirm with the brew list
command:
➜ brew list | grep id3tool
id3tooland you can see the location where it got installed, using the
shell’s type command:
➜ type id3tool
/usr/local/bin/id3toolYou can now run id3tool to examine your MP3
files:
➜ id3tool song.mp3
Filename: song.mp3
Song Title: Playing The Game
Artist: Gentle Giant
Album: The Power And The Glory
Track: 4
Year: 1974
Genre: Progressive Rock (0x5C)Here is a list of common brew commands for
managing software packages:
Action | Homebrew command |
Search for a package that meets your needs. | brew search
brew search ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access