Commands
Find name of the process running on a port
Find name of the process running on a port
lsof -i :portnumber
lsof -i tcp:portnumber
lsof -i udp:portnumber
fuser portnumber/tcp
netstat -tulpn | grep :portnumber
Find owner of a process
Find owner of a process
ps -ef | grep PID
ps -p PID (gives name of the command that started this process)
Current working directory of a process
Current working directory of a process
pwdx PID
alternatively, you can browse through /proc/PID/cwd
Find name of the package responsible for a command
Find name of the package responsible for a command
dpkg -S /bin/ls