Command Line

Helpful Linux command line functions

Nginx

Nginx: Find domain name

Search for all references to a domian in nginx config files

bash
$ grep -r mydomain.com /etc/nginx/sites-enabled/*

Ports

Kill Node process by Port

Find and Kill the node process on a port:

bash
$ lsof -i tcp:3000

COMMAND  PID      USER      FD   TYPE   DEVICE      SIZE/OFF  NODE NAME
node     3391363  ifactory  22u  IPv6   179906924   0t0       TCP *:3008 (LISTEN)

$ kill -9 3391363         [ syntax: kill -9 <PID> ]

Check outbound Port is open

Use http://portquiz.net/ to check if issue is related to a blocked outbound port.

Last updated

Was this helpful?