Basic Linux Command

Published: June 2025

Real time log analysis/showing with last nth number of log

tail -n 20 -f /path/to/your/logfile.log

Find the Process Using the Port

To find which process is using a specific port, you can use the following command:

lsof -i :port_number

Terminate the process ID(PID):

kill -9 process_id