killing process using a port code example Example 1: kill a port kill $(lsof -ti:3000) Example 2: kill port kill -9 $(lsof -t -i tcp:8080)