difference between netstat and ss in linux?

前端 未结 5 896
自闭症患者
自闭症患者 2021-01-30 20:36

In linux, netstat command tells us information of active sockets in system.

I understand that netstat uses /proc/net/tcp to acquire the system

5条回答
  •  没有蜡笔的小新
    2021-01-30 21:13

    ss is a utility used to investigate sockets in Linux and Unix systems. It shows information similar to netstat and able to dump socket statistics.

    But netstat cannot be replaced full by ss. Some netstat commands correspond better to ip command.

        $ netstat -r   replaced by  $ ip route
        $ netstat -i   replaced by  $ ip -s lin
        $ netstat -g   replaced by  $ ip maddr
    

    I would say the "older" netstat command can be replaced with both ss and ip commands.

提交回复
热议问题