by ktpsns · 8y ago · 0 comments
Another very handy command is
sudo netstat -atpn
which shows you the processes and owners of open TCP/UDP ports. The argument combination is as weird as "ps aux" that I just memorized it by heart.My most common grep phrase is grep -iIRn - good for searching in code (when IDE can't find something). You can remove -i if you care about case, but I mostly used it for plsql code, and that's not case-sensitive.
naw, that would be `netstat -lntup` (listening, nummeric, tcp, udp, programm)
your mentioned command shows essentially all currently active tcp network streams. https://explainshell.com/explain?cmd=sudo+netstat+-atpn
btw, glances is even more complete than htop
Chan is a japanese name ending for children, various communities have created several Anime mascots over the years. Theyre generally suffixed with that -tan, as a cute misspronounciation of chan.
https://en.m.wikipedia.org/wiki/OS-tan
Btw, 4tan should be that 4chan mascot. Ive seen it previously on sankaku complex, but its been too many years ago. Cant find it right now.
/Edit: i probably should mention that you shouldnt visit sankaku complex at work. Its very... Questionable with nudity
ss -atpn | column -t
Or pipe into `cat`htop is my trusted standby. Fell in love with netdata though. https://github.com/firehol/netdata - since we all do our best to stay away from getting shells on the servers, netdata is awesome
It seems to do something very similar to Cockpit, but netdata has way more stuff out of the box.
lsof has a good case to join coreutils.
$ type ls
ls is aliased to `ls --color=auto'
On slow file systems (for instance, think of shared machines with large directories, NFS and heavy load) this can take ages to give output. Instead, if you just call /bin/ls, this call only calls http://man7.org/linux/man-pages/man3/readdir.3.html and thus gives output promptly.