Post #1384928
2025-12-16 18:19 UTC
Something that really improved my life was learn to properly use find, grep, xargs and sed. Besides that, there are these two little ‘hacks’ that are really handy at times…
1- find out which process is using some local port (i.e. the modern netstat replacement):
$ ss -ltnp 'sport = :'
2- find out which process is consuming your bandwidth:
$ sudo nethogs
Replies (2)
-
@Ephera@lemmy.ml 2025-12-16 19:38
I always just do ss -ltnp | grep , which filters well enough for my purposes and is a bit easier to remember…
-
@eli@lemmy.world 2025-12-17 06:53
You can do “ss -aepni” and that will dump literally everything ss can get its hands on. Also, ss can’t find everything, it does have some limitations. I believe ss can only see what the kernel can see(host connections), but tcpdump can see the actual network flow on the network layer side. So incoming, outgoing, hex(?) data in transit, etc. I usually try to use ss first for everything since I don’t think it requires sudo access for the majority of its functionality, and if it can’t find something then I bring out sudo tcpdump.