Bash Wiki
Posts (Latest 30 updated) :
Read all
Contents:
  1. [Linux] Bash brew uso equivalente: Manage software packages on macOS and Linux
    1. Overview
    2. Usage
    3. Common Options
    4. Common Examples
      1. Install a Package
      2. Uninstall a Package
      3. Update Homebrew
      4. Upgrade a Package
      5. List Installed Packages
      6. Search for a Package
    5. Tips

[Linux] Bash brew uso equivalente: Manage software packages on macOS and Linux

Overview

The brew command is a package manager for macOS and Linux that simplifies the installation, management, and removal of software packages. It allows users to easily install applications and libraries from the command line, making it a powerful tool for developers and system administrators.

Usage

The basic syntax of the brew command is as follows:

brew [options] [arguments]

Common Options

  • install: Install a specified package.
  • uninstall: Remove a specified package.
  • update: Update Homebrew and all installed packages.
  • upgrade: Upgrade a specified package to its latest version.
  • list: List all installed packages.
  • search: Search for a package by name.

Common Examples

Here are some practical examples of using the brew command:

Install a Package

To install a package, such as wget, use the following command:

brew install wget

Uninstall a Package

To remove a package, such as wget, run:

brew uninstall wget

Update Homebrew

To update Homebrew and all installed packages, execute:

brew update

Upgrade a Package

To upgrade a specific package, such as wget, to its latest version, use:

brew upgrade wget

List Installed Packages

To see all installed packages, simply run:

brew list

Search for a Package

If you want to find a package by name, for example, git, you can search for it like this:

brew search git

Tips

  • Always run brew update before installing or upgrading packages to ensure you have the latest information.
  • Use brew doctor to troubleshoot potential issues with your Homebrew installation.
  • Consider using brew cleanup to remove old versions of installed packages and free up space.