kill pid rails mac code example Example 1: rails kill server kill -9 $(lsof -i tcp:3000 -t) Example 2: kill rails lsof -wni tcp:3000 kill -9 PID