How To Install ngrep on Kali Linux
Introduction
In this tutorial we learn how to install ngrep
on Kali Linux.
What is ngrep
ngrep is:
ngrep strives to provide most of GNU grep’s common features, applying them to the network layer. ngrep is a pcap-aware tool that will allow you to specify extended regular expressions to match against data payloads of packets. It currently recognizes TCP, UDP and ICMP across Ethernet, PPP, SLIP and null interfaces, and understands bpf filter logic in the same fashion as more common packet sniffing tools, such as tcpdump and snoop.
There are three methods to install ngrep
on Kali Linux. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install ngrep Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install ngrep
using apt-get
by running the following command:
sudo apt-get -y install ngrep
Install ngrep Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install ngrep
using apt
by running the following command:
sudo apt -y install ngrep
Install ngrep Using aptitude
If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install ngrep
using aptitude
by running the following command:
sudo aptitude -y install ngrep
How To Uninstall ngrep on Kali Linux
To uninstall only the ngrep
package we can use the following command:
sudo apt-get remove ngrep
Uninstall ngrep And Its Dependencies
To uninstall ngrep
and its dependencies that are no longer needed by Kali Linux, we can use the command below:
sudo apt-get -y autoremove ngrep
Remove ngrep Configurations and Data
To remove ngrep
configuration and data from Kali Linux we can use the following command:
sudo apt-get -y purge ngrep
Remove ngrep configuration, data, and all of its dependencies
We can use the following command to remove ngrep
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge ngrep
Dependencies
ngrep have the following dependencies:
References
Summary
In this tutorial we learn how to install ngrep
package on Kali Linux using different package management tools: apt
, apt-get
and aptitude
.