Published on

What are `apt` and `brew`?

Authors
  • avatar
    Name
    hwahyeon
    Twitter

Linux provides tools to efficiently install, update, remove, and manage dependencies for software (packages). Two widely used tools are listed below:

1. apt (Advanced Package Tool)

A package manager used in Debian-based Linux distributions, such as Ubuntu, where commands are executed using apt.

sudo apt update  # Refresh the package list
sudo apt install vim  # Install vim
sudo apt remove vim  # Remove vim

2. homebrew

A package manager for macOS. While it is primarily used on macOS, it is also available on Linux, and commands are executed using brew.

brew update  # Update Homebrew
brew install wget  # Install wget
brew uninstall wget  # Remove wget

The process of installing and removing programs is somewhat similar to using Control Panel > Add or Remove Programs in Windows, but there are some key differences.

ComparisonControl Panel (Add or Remove Programs)Package Manager
TargetPrimarily desktop applications (e.g., MS Office, Chrome) and some CLI tools (e.g., Git).CLI programs and libraries (e.g., Vim)
ManagementManual: Users must search, install/remove programs themselvesCommand-based: Fast and automated management
Dependency ManagementLimited dependency managementAutomatic management of package dependencies
InstallationDownload and install programs individuallyInstall with a single command