Slackware HowTo

Analyze processes and ports with lsof, ss, and fuser on Slackware

Quickly identify what is listening on a port or blocking a mounted file.

1. Goal

Quickly identify what is listening on a port or blocking a mounted file.

2. Files and components involved

lsof
ss
fuser
/proc

3. Operational flow

ss -lntup
lsof -i :80
fuser -v /mnt/dati
lsof /var/log/messages

4. Operational verification

ss -lntup
grep port
ps -fp PID
fuser -km mountpoint

5. Practical notes

Before using a script in production, always test the full flow with controlled input, logs, and exit codes.

A small but readable script, with clear output and consistent exit codes, is more useful than an opaque one.

Quick checklist

[ ] Backup or copy of the existing configuration completed
[ ] Files and commands updated as expected
[ ] Local test completed successfully
[ ] Logs or final output verified
[ ] Rollback procedure documented

Back to the Linux HowTo section