Outils pour utilisateurs

Outils du site


netstat

Table des matières

netstat

source

netstat est un outil qui permet de savoir quel processus utilise quel port (pour ensuite le kill et libérer le port #freedom).

usage de netstat

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

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.txt · Dernière modification : 2025/02/21 21:37 de luc