Mac terminal commands kill process9/7/2023 ![]() The kill command to actually free up the port We’ll need it for our next command, which is the kill command. ![]() Just copy the PID to your clipboard at this point. The output will show the COMMAND (essentially, the user-friendly name for the application, if applicable), the PID (which is something you’ll want to note), the USER, FD, TYPE, DEVICE, SIZE/OFF, NODE, and NAME. Therefore, if we’re looking to kill any ports running on 80, we would run the following: lsof -i :80 The find command is as follows: lsof -i : Every application on a Mac runs on a different process ID. For now, I assume that the reason why you’re here isn’t so much about the why, but the how - specifically, how can you quickly free up that port? First, find the PID of the port you want to killįirstly, to kill something on your Mac, you’re going to want to find out the ID of it.Ī PID is short for a Process ID. ![]() So what gives?įiguring out why the port is in use is a topic for another article. However, when I check around to see if I have any other applications that are running on port 80, I can’t find any. Sometimes in my local development work, there’s a port that is unexpectedly in use that I need to work with.Ī specific use case for this is when I’m developing against port 80, for instance, but when starting up my application, the logs indicate that the port is already in use. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |