use ip command to show statistics about transferred and received packages

The traditional ifconfig command can show the statistics about transferred and received packages on any network interface card in Linux. However, ifconfig command has been deprecated. ip command is the successor. The -s option can be used in ip command to show the transferred and received packages:

ip -s addr

for example,

$ ip -s addr show dev wlp2s0
2: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 14:4f:8a:05:cf:49 brd ff:ff:ff:ff:ff:ff
inet brd scope global dynamic noprefixroute wlp2s0
valid_lft 6518sec preferred_lft 6518sec
inet6 fe80::516b:7998:b0c1:4eb/64 scope link noprefixroute
valid_lft forever preferred_lft forever
RX: bytes packets errors dropped missed mcast
204859104 306119 0 0 0 0
TX: bytes packets errors dropped carrier collsns
20487293 233411 0 0 0 0