Linux Tutorials - Herong's Tutorial Examples - v5.45, by Herong Yang
"lsof" - List of Open Files
This section provides a tutorial example on how to use 'lsof' command to display network connections as open files
"lsof" is a command line tool that allows you to list of open files by all processes currently running on the system. It includes options to list network connections as open files.
List of all network connections as open files.
herong$ lsof -i herong@mail ~]$ sudo lsof -i COMMAND PID USER TYPE NODE NAME systemd 1 root IPv4 TCP *:sunrpc (LISTEN) systemd 1 root IPv6 UDP *:sunrpc systemd 1 root IPv6 TCP *:websm (LISTEN) avahi-dae 1256 avahi IPv4 UDP *:mdns avahi-dae 1256 avahi IPv6 UDP *:35424 chronyd 1288 chrony IPv4 UDP localhost:323 dnsmasq 2265 dnsmasq IPv4 UDP *:bootps mysqld 5067 mysql IPv6 TCP *:opsession-prxy (LISTEN) httpd 5839 root IPv6 TCP *:https (LISTEN) sshd 14871 root IPv4 TCP *:ssh (LISTEN) mysqld 28037 mysql IPv6 TCP *:mysql (LISTEN) cupsd 28201 root IPv6 TCP localhost:ipp (LISTEN) dovecot 28244 root IPv4 TCP *:pop3s (LISTEN) dovecot 28244 root IPv6 TCP *:imaps (LISTEN) vsftpd 28601 root IPv6 TCP *:ftp (LISTEN) pptpd 898747 root IPv4 TCP *:pptp (LISTEN) master 1477167 root IPv4 TCP *:smtp (LISTEN) master 1477167 root IPv6 TCP *:submission (LISTEN) master 1477167 root IPv4 TCP *:urd (LISTEN) httpd 2714061 apache IPv6 TCP *:https (LISTEN) ...
Table of Contents
Cockpit - Web Portal for Administrator
SELinux - Security-Enhanced Linux
Setup Ethernet Connection on CentOS
Network Firewall Tools on CentOS
"firewalld" and "firewall-cmd" on CentOS
Manage Multiple Firewall Zones
"nftables" and "nft" on CentOS
"nmap" - Network Mapper on CentOS
Monitor Network Services on CentOS
"ifconfig" - Trace Routes to Remote Host
"traceroute" - Trace Routes to Remote Host
"netstat" - Display Network Statistics
SSH Protocol and ssh/scp Commands
Software Package Manager on CentOS - DNF and YUM
vsftpd - Very Secure FTP Daemon