Tuesday, August 18, 2009

Command to check service running on linux


veeresh@ubuntu:~$ sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 18108/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2738/cupsd
tcp6 0 0 :::22 :::* LISTEN 18108/sshd
tcp6 0 0 ::1:631 :::* LISTEN 2738/cupsd
udp 0 0 0.0.0.0:68 0.0.0.0:* 3069/dhclient
udp 0 0 0.0.0.0:51406 0.0.0.0:* 2710/avahi-daemon:
udp 0 0 0.0.0.0:5353 0.0.0.0:* 2710/avahi-daemon: