Skip to main content

Installing ag

Ubuntu / Debian​

sudo apt update
sudo apt install silversearcher-ag
ag --version
# ag version 2.2.0

macOS (Homebrew)​

brew install the_silver_searcher

Fedora / RHEL / CentOS​

sudo dnf install the_silver_searcher

Alpine Linux​

apk add the_silver_searcher

Building from Source​

Needed only for the absolute latest version or on unsupported platforms:

sudo apt install automake pkg-config libpcre3-dev zlib1g-dev liblzma-dev
git clone https://github.com/ggreer/the_silver_searcher.git
cd the_silver_searcher
./build.sh
sudo make install

Verify PCRE Support​

ag --version | grep PCRE
# PCRE version 8.45 2021-06-15