snort -VDisplays the installed Snort version and build information to verify successful installation.
A network intrusion detection and prevention system that inspects traffic in real time against a rule language.
sudo apt install snortsnort -vRuns Snort in verbose mode to print TCP/IP packet headers to the console without logging.
snort -vdDisplays packet headers and application layer data (payloads) in verbose mode.
snort -vdeDisplays packet headers, payloads, and Data Link Layer (Layer 2) headers for deep inspection.
snort -v -XDumps the raw packet data starting from the link layer in hex and ASCII format.
snort -eDisplays the Layer 2 (Data Link) headers, including MAC addresses, for captured packets.
snort -lLogs captured packets to the specified directory, creating hierarchical folders based on IP addresses.
Example
snort -v -l ./logsnort -bLogs packets in binary (tcpdump) format, which is much faster than ASCII logging.
Example
snort -l ./log -bsnort -K asciiForces Snort to log packets in ASCII format regardless of other default settings.
Example
snort -l ./log -K ascii -vsnort -K noneDisables packet logging entirely, useful when only alerting is required to save disk space.
Example
snort -l ./log -K nonesnort -A consolePrints alerts directly to the console screen for real-time monitoring of rule matches.
Example
snort -c /etc/snort/snort.conf -A consolesnort -A fastLogs alerts in a single-line format including timestamp, message, IPs, and ports for rapid parsing.
Example
snort -c /etc/snort/snort.conf -A fastsnort -A fullLogs alerts with full packet header information, providing maximum context for each detection.
Example
snort -c /etc/snort/snort.conf -A fullsnort -A unsockSends alerts to a UNIX socket for processing by external programs.
Example
snort -c /etc/snort/snort.conf -A unsocksnort -A noneDisables internal alerting, typically used when logging is handled strictly by Unified2 output.
Example
snort -c /etc/snort/snort.conf -A nonesnort -qRuns Snort in quiet mode, suppressing banner and initialization messages to focus on alerts.
Example
snort -q -A console -c /etc/snort/snort.confsnort -A cmgGenerates 'cozy' alerts that display the packet payload in hex and text alongside the alert message.
Example
snort -A cmg -c /etc/snort/snort.confsnort -rReads and processes a single PCAP file through the NIDS engine instead of listening on an interface.
Example
snort -r capture.pcap -c /etc/snort/snort.confsnort --pcap-dirRecursively processes all PCAP files found within the specified directory.
Example
snort --pcap-dir=/var/pcaps/ -c /etc/snort/snort.confsnort --pcap-filterFilters the files in a PCAP directory to only process those matching a specific shell pattern.
Example
snort --pcap-dir=/pcaps --pcap-filter="*.pcap" -c snort.confsnort --pcap-showDisplays the name of the PCAP file currently being processed during a bulk read operation.
Example
snort -r capture.pcap -A console --pcap-showsnort --pcap-resetResets the internal Snort state between processing each PCAP file in a directory to ensure clean tests.
Example
snort --pcap-dir ./pcaps --pcap-reset -c snort.confsnort -r -nProcesses only the first N packets of a capture file, useful for quick rule validation on large files.
Example
snort -r attack.pcap -c snort.conf -n 10snort -NDisables packet logging regardless of configuration, retaining only alerts to improve I/O performance.
Example
snort -N -c /etc/snort/snort.confsnort -DRuns Snort as a background daemon process, detaching it from the current terminal session.
Example
snort -D -c /etc/snort/snort.confsnort -k noneDisables checksum verification, useful if packets are captured on interfaces performing checksum offloading.
Example
snort -k none -c /etc/snort/snort.confsnort --search-methodForces the use of a specific pattern matching algorithm (e.g., Aho-Corasick) for performance testing.
Example
snort -c snort.conf --search-method ac-splitsnort --max-packet-threadsLimits the number of packet processing threads (Snort 3 specific or experimental threading builds).
Example
snort -c snort.conf --max-packet-threads 4snort --dump-dynamic-rulesExports loaded dynamic rules (shared object rules) to text files for inspection and debugging.
Example
snort -c snort.conf --dump-dynamic-rules=/tmp/rulessnort --pauseStarts Snort but pauses processing immediately, waiting for a resume signal, used in synchronized testing.
Example
snort -c snort.conf --pausesnort -SOverrides variable definitions from the command line without modifying the configuration file.
Example
snort -c snort.conf -S HOME_NET=192.168.1.0/24BPF FilteringApplies a Berkeley Packet Filter (BPF) at the end of the command to ignore specific traffic (e.g., SSH).
Example
snort -c snort.conf -A console 'not port 22'snort -u -gRuns Snort as a specific user and group to minimize security risks associated with running as root.
Example
snort -D -c snort.conf -u snort_user -g snort_groupShow Application DataDumps the application layer (payload) data for captured packets, useful for inspecting HTTP or DNS bodies.
Example
snort -dsnort --snaplenSets the snap length (packet capture size) manually, ensuring full packet capture for jumbo frames.
Example
snort -i eth0 --snaplen 1518 -vsnort -MLogs console messages to syslog in addition to printing them to the screen.
Example
snort -c snort.conf -A console -Msnort --conf-error-outForces Snort to stop processing and exit immediately upon encountering the first configuration error.
Example
snort -c snort.conf --conf-error-outsnort --create-pidfileForces creation of a PID file even if Snort is not running in daemon mode.
Example
snort -c snort.conf --create-pidfilesnort --disable-inline-initAllows Snort to run in inline mode without requiring hardware bridging initialization.
Example
snort -c snort.conf --disable-inline-initsnort -QEnables Inline Mode (IPS), allowing Snort to drop packets defined by 'drop' rules.
Example
snort -c snort.conf -Q --daq afpacket -i eth0:eth1snort --daqSpecifies the Data Acquisition (DAQ) module type (e.g., pcap, afpacket, nfq) for packet I/O.
Example
snort --daq pcap -c snort.confsnort --daq-dirTells Snort where to look for DAQ modules if they are not in the standard system library path.
Example
snort --daq-dir /usr/local/lib/daq --daq afpacketsnort --daq-listLists the available Data Acquisition (DAQ) modules installed on the system.
snort -OObfuscates IP addresses in printed logs to sanitize data during sensitive sharing or testing.
Example
snort -c snort.conf -Osnort --warn-allEnables all warning messages during configuration loading to identify potential rule syntax issues.
Example
snort -c snort.conf --warn-allCapture and AnalyzeWorkflow: Captures traffic to binary first, then analyzes it offline with full rules to minimize packet drops.
Example
snort -i eth0 -b -l ./temp && snort -r ./temp/snort.log.* -c snort.confsnort --pid-pathSpecifies the directory where the PID file should be written, essential for service management scripts.
Example
snort -D -c snort.conf --pid-path /var/run/snortsnort --nolock-pidfileCreates the PID file without locking it, useful in specific containerized or scripted environments.
Example
snort -c snort.conf --pid-path /var/run --nolock-pidfilesnort --rule-to-hexOutputs the binary rule database in a hex format, typically used for low-level rule engine debugging.
Validate Local RulesValidates the main config while dynamically adding a custom rule path not defined in the main file.
Example
snort -T -c /etc/snort/snort.conf --include-path /home/user/custom_rulesOffline PCAP ForensicsAnalyzes a malware PCAP ignoring checksums and generating full-detail alerts for forensic review.
Example
snort -r malware.pcap -c snort.conf -k none -A fullHigh Performance SniffingCaptures packets to a binary log file with no checksums or alerting for maximum write speed.
Example
snort -i eth0 -b -l /tmp/snort_raw -k noneRule ProfilingRuns against a directory of PCAPs and prints performance statistics for the top CPU-consuming rules.
Example
snort -c snort.conf --pcap-dir=./test_pcaps --profile-rulesPreprocessor ProfilingProfiles the performance of enabled preprocessors to identify bottlenecks in inspection modules.
Example
snort -c snort.conf --pcap-dir=./test_pcaps --profile-preprocsPacket Data PrintingPrints packet data in a character-only format, omitting hex dumps, for easier reading of text payloads.
Example
snort -d -e -v -CSpecific Interface TypePasses specific variables to the DAQ module, such as increasing the buffer size to prevent packet loss.
Example
snort -i eth0 --daq-var buffer_size_mb=1024Alert to Syslog OnlySends alerts to syslog facilities and discards local log files by pointing the log directory to null.
Example
snort -c snort.conf -s -l /dev/nullsnort --addressSpecifies the IP address of the listening interface if Snort cannot auto-detect it correctly.
Example
snort -i eth0 --address 192.168.1.50Signal HandlingSends a SIGHUP signal to the Snort process to force it to reload the configuration file and restart.
Example
kill -SIGHUP $(pidof snort)Signal HandlingForces Snort to dump current packet capture statistics to the console/syslog without stopping the process.
Example
kill -SIGUSR1 $(pidof snort)Verbose Replay InspectionReplays exploit traffic quietly while showing 'cozy' alerts with payload data to confirm signature match location.
Example
snort -A cmg -q -c snort.conf -r exploit_traffic.pcapCSV OutputCustomizes the output format of logs (if CSV output plugin is enabled) by defining the separator character.
Example
snort -c snort.conf -A fast -y --csv-separator ,snort --versionPrints the full version information including library versions and compiler options.
QuitGracefully shuts down the Snort process, ensuring all logs are flushed and closed properly.
Example
kill -SIGTERM $(pidof snort)A high-performance, multi-threaded IDS/IPS and network security monitoring engine with EVE JSON logging.
A network security monitor that turns traffic into rich, structured logs of connections, DNS, HTTP, TLS and files.
Wireshark’s terminal version: capture and decode traffic with full dissectors and display filters, and extract fields to text.
Replays captured pcap traffic onto a network at chosen speeds — useful for testing IDS rules and network devices.