kill used port code example Example 1: kill a port kill $(lsof -ti:3000) Example 2: kill port lsof -i:8080