Linux: Difference between revisions

From roonics
Jump to navigation Jump to search
Line 5: Line 5:


Example output:
Example output:
<pre class="bash">
<pre style="color: silver; background: black;">
tcp        0      0 0.0.0.0:5666            0.0.0.0:*              LISTEN      685/nrpe
tcp        0      0 0.0.0.0:5666            0.0.0.0:*              LISTEN      685/nrpe
tcp        0      0 127.0.0.1:199          0.0.0.0:*              LISTEN      958/snmpd
tcp        0      0 127.0.0.1:199          0.0.0.0:*              LISTEN      958/snmpd

Revision as of 15:31, 12 March 2019

Linux

Useful Commands

Show what is listening on what port

netstat -tulpn | grep LISTEN

Example output:

tcp        0      0 0.0.0.0:5666            0.0.0.0:*               LISTEN      685/nrpe
tcp        0      0 127.0.0.1:199           0.0.0.0:*               LISTEN      958/snmpd
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      962/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1179/master
tcp6       0      0 :::5666                 :::*                    LISTEN      685/nrpe
tcp6     129      0 :::2224                 :::*                    LISTEN      663/ruby
tcp6       0      0 :::22                   :::*                    LISTEN      962/sshd
tcp6       0      0 ::1:25                  :::*                    LISTEN      1179/master

test1