how to stop a port linuix code example
Example 1: stop a process running on a port
# Print PID of process bound on that port.
fuser 8080/tcp
# Kill that process
fuser -k 8080/tcp
Example 2: kill linux port
sudo fuser -k 1883/tcp
# Print PID of process bound on that port.
fuser 8080/tcp
# Kill that process
fuser -k 8080/tcp
sudo fuser -k 1883/tcp