Install Ngrep On A Debian, Ubuntu, Alpine, Arch, Kali, Fedora, Raspbian And MacOS

Install Ngrep On A Debian, Ubuntu, Alpine, Arch, Kali, Fedora, Raspbian And MacOS

ngrep

Filter network traffic packets using regular expressions.

Maintainer: Romain Francoise



Section: net

Install ngrep

  • Debian apt-get install ngrep Click to copy
  • Ubuntu apt-get install ngrep Click to copy
  • Alpine OS apk add ngrep Click to copy
  • Arch Linux pacman -S ngrep Click to copy
  • Kali Linux apt-get install ngrep Click to copy
  • Fedora dnf install ngrep Click to copy
  • Raspbian apt-get install ngrep Click to copy
  • macOS brew install ngrep Click to copy

Filter network traffic packets using regular expressions.

How to use ngrep?

Below are few example commands for ngrep that you can use in the terminal.

Capture traffic of all interfaces:
ngrep -d anyClick to copy
Capture traffic of a specific interface:
ngrep -d eth0Click to copy
Capture traffic crossing port 22 of interface eth0:
ngrep -d eth0 port 22Click to copy
Capture traffic from or to a host:
ngrep host www.example.comClick to copy
Filter keyword 'User-Agent:' of interface eth0:
ngrep -d eth0 'User-Agent:'Click to copy
To install the latest version of ngrep in your favorite operating system just copy the ngrep installation command from above and paste it into terminal. It will download and install the latest version of ngrep 2026 package in your OS.