Open ports on current host.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Tue, 12 Jan 2016 19:39:04 +0200
changeset 1867 bc5808420c99
parent 1866 96c631dadd1a
child 1868 47075059112f
Open ports on current host.
stat.rst
--- a/stat.rst	Tue Jan 12 19:38:51 2016 +0200
+++ b/stat.rst	Tue Jan 12 19:39:04 2016 +0200
@@ -294,6 +294,12 @@
 
   $ nmap $IP
 
+Open ports on current host::
+
+  $ netstat -i
+  $ netstat -i -t
+  $ netstat -i -n
+
 Opened file by process.
 =======================
 
@@ -301,7 +307,8 @@
 ------
 ::
 
-  $ lsof -p <pid>
+  $ lsof -p $PID
+  $ lsof -c $CMD
 
 FreeBSD.
 --------
@@ -341,6 +348,7 @@
 ``[46]`` - IPV4 or IPV6, ``protocol`` - tcp, udp::
 
   $ lsof -i[46][protocol][@{hostname|hostaddr}][:{service|port}]
+  $ lsof -i :80
 
 ::
 
@@ -408,3 +416,4 @@
   ispell.exe         pid: 244     784: D:\home\drivers\token_api\src
   Far.exe            pid: 432     10C: D:\home\drivers\token_api
 
+