Shell Commands

kill a process by its name

PROCESS_NAME=ABC
pid=`ps -ef | grep $PROCESS_NAME | grep -v grep | awk '{print $2}'`
kill -9 $pid

start a process as deamon

nohup ./NAME &

find a file

sudo updatedb
locate filename

lookup network connections

ss -ntlp
ss -nulp
ss -antp

netstat -tnlp
netstat -nulp

lookup process

ps -ef | grep PROCESS

test network

# test tcp port
telnet host port

ping host

DNS lookup

dig abc.com
dig abc.com @223.5.5.5

stop a process

kill -9 $pid