Whether it is to pipe the Tcpdump output to another machine hosting Wireshark or checking which service is listening on which port, Windows cmd has similar commands that are present in Linux. Here is some of the most command used in Linux that have equivalent purpose on Windows:
Filtering the output of a commande:
- Linux: lsof -s | grep 'https'
- Windows: netstat -n -a | findstr "https" (//note the double quotes)
Piping tcp dump to another machines that hosts Wireshark
Author's note: From here on, the content is AI-generated
- Linux: ssh root@remote-linux "tcpdump -s 0 -U -n -w - -i eth0 not port 22" | wireshark -k -i -
- Windows: ssh root@remote-linux "tcpdump -s 0 -U -n -w - -i eth0 not port 22" | "C:\Program Files\Wireshark\wireshark.exe" -k -i - (//note that Windows 10 and 11 come with a native SSH client built into cmd!)
Checking which service is listening on which port
- Linux: netstat -tulpn
- Windows: netstat -ano (//note that this gives you the PID (Process ID) which you can then look up in the Task Manager or using the 'tasklist' command)
Viewing the contents of a file directly in the terminal
- Linux: cat filename.txt
- Windows: type filename.txt
Listing the contents of a directory (including hidden files)
- Linux: ls -la
- Windows: dir /a
Finding a specific file by name across the system
- Linux: find / -name "config.txt"
- Windows: dir \config.txt /s (//the /s flag tells it to search all subdirectories)
Checking network interface configurations and IP addresses
- Linux: ifconfig (or ip a)
- Windows: ipconfig /all
Viewing a list of active running processes
- Linux: top (or ps aux)
- Windows: tasklist
Terminating or "killing" a process by its Process ID (PID)
- Linux: kill -9 1234
- Windows: taskkill /F /PID 1234 (//the /F flag forces the termination of the process)
Tracing the network route to a remote host
- Linux: traceroute google.com
- Windows: tracert google.com
Clearing the terminal screen
- Linux: clear
- Windows: cls
Conclusion
While Linux often gets the spotlight for its powerful command-line interface, Windows has a highly capable native command prompt as well. Whether you are troubleshooting network connectivity, managing local files, or monitoring system processes, mastering these equivalent Windows commands will make seamlessly transitioning between both operating systems a breeze.