Capture packets to a specific location

dumpcap

dumpcap --interface {{1}} -w {{path/to/output_file.pcapng}}

click the source code to copy install dumpcap on any operating system with command-not-found.com