====== netstat et ss ====== [[https://linuxize.com/post/check-listening-ports-linux/|source]] ''netstat'' et ''ss'' sont des outils qui permettent de savoir quel processus utilise quel port (pour ensuite le kill et libérer le port #freedom). ===== ss ===== ''ss'' est un remplaçant plus moderne de ''netstat'', qui utilise le même vocable/option. A utiliser si netstat n'est pas dispo ou si netstat pose problème (?). ss -tunlp # -t : Show TCP ports. # -u : Show UDP ports. # -n : Show numerical addresses instead of resolving hosts. # -l : Show only listening ports. # -p : Show the PID and name of the listener’s process. This information is shown only if you run the command as root or sudo user. # filtrer les résultats sur le port 80 ss -tnlp | grep :80 ===== netstat ===== Stack obsolète, mais toujours fonctionnelle. netstat -tunlp # -t : Show TCP ports. # -u : Show UDP ports. # -n : Show numerical addresses instead of resolving hosts. # -l : Show only listening ports. # -p : Show the PID and name of the listener’s process. This information is shown only if you run the command as root or sudo user. # filtrer les résultats sur le port 80 netstat -tnlp | grep :80