title: difference between netstat and ss in linux?
body: <p>In linux, netstat command tells us information of active sockets in system.</p>
  
  <p>I understand that <code>netstat</code> uses <code>/proc/net/tcp</code> to acquire the system network information.</p>
  
  <p>Since <code>netstat</code> man page says that netstat is obsolete, so we should use 'ss'.</p>
  
  <pre><code>NOTE
     This program is obsolete.  Replacement for netstat is ss.   Replacement
     for  netstat -r is ip route.  Replacement for netstat -i is ip -s link.
     Replacement for netstat -g is ip maddr.
  </code></pre>
  
  <p>I have discovered that <code>ss</code> performs similar functionality but it does not use
  <code>/proc/net/tcp</code> to acquire system network information.</p>
  
  <p>Now I am curious how <code>ss</code> gets system network socket information?</p>