How to Kill a Process Running on a Port Johnny Simpson on September 18, 2022 It is common in Node.js and other languages to run a script on a certain port. Since ports can come in and out of use, it's also common to get the ... Read full post Submit Preview Dismiss Collapse Expand Sandro Miranda Sandro Miranda Sandro Miranda Follow Trying to learn as much as I can... specially in tech! Location Brazil Work Backend Engineer at Luma Health Joined Jun 29, 2022 • Sep 19 '22 Dropdown menu Copy link Hide neat. that happens more often than we'd wanted to. btw, i usually do sudo kill -9 $(sudo lsof -t -i:3000) to get the job done real quick. Collapse Expand Johnny Simpson Johnny Simpson Johnny Simpson Follow Daily dev tips from fjolt.com - Regular tips to help you improve your development skills. Education UCL Joined Nov 15, 2021 • Sep 19 '22 Dropdown menu Copy link Hide Nice, that's a pretty simple way of doing it Collapse Expand Comment deleted Collapse Expand 𒎏Wii 🏳️⚧️ 𒎏Wii 🏳️⚧️ 𒎏Wii 🏳️⚧️ Follow Blog: https://blog.but.gay Mastodon: @darkwiiplayer@tech.lgbt Pronouns: en.pronouns.page/@darkwiiplayer Pronouns she/her;q=1, they/them;q=0.8, */*;q=0.2 Joined Dec 4, 2018 • Sep 19 '22 Dropdown menu Copy link Hide Sounds a bit pointless, given how linux already has the right tools for the job 🤔 Collapse Expand Johnny Simpson Johnny Simpson Johnny Simpson Follow Daily dev tips from fjolt.com - Regular tips to help you improve your development skills. Education UCL Joined Nov 15, 2021 • Sep 19 '22 Dropdown menu Copy link Hide yeah I don't think you need a separate package for it either really. I guess it's just a wrapper for the basic linux commands. 𒎏Wii 🏳️⚧️ 𒎏Wii 🏳️⚧️ 𒎏Wii 🏳️⚧️ Follow Blog: https://blog.but.gay Mastodon: @darkwiiplayer@tech.lgbt Pronouns: en.pronouns.page/@darkwiiplayer Pronouns she/her;q=1, they/them;q=0.8, */*;q=0.2 Joined Dec 4, 2018 • Sep 19 '22 Dropdown menu Copy link Hide It's a lot of code for what could essentially be a one-liner though 😐 Collapse Expand Comment deleted 𒎏Wii 🏳️⚧️ 𒎏Wii 🏳️⚧️ 𒎏Wii 🏳️⚧️ Follow Blog: https://blog.but.gay Mastodon: @darkwiiplayer@tech.lgbt Pronouns: en.pronouns.page/@darkwiiplayer Pronouns she/her;q=1, they/them;q=0.8, */*;q=0.2 Joined Dec 4, 2018 • Sep 19 '22 Dropdown menu Copy link Hide Unless many of your servers are running windows, it doesn't just sound pointless, but actually is. Collapse Expand Daniel Hillmann Daniel Hillmann Daniel Hillmann Follow Location Copenhagen Education PBA in Software development Work Software Engineer at SumUp Joined Jun 13, 2019 • Sep 20 '22 Dropdown menu Copy link Hide Nice. I wrote a small CLI tool to help you also do this. Cross platform ofc. npmjs.com/package/kill-port-process Collapse Expand decker decker decker Follow Work Senior Software Developer with a Degree in Computer Science Joined May 27, 2022 • Sep 19 '22 Dropdown menu Copy link Hide Good tip. Collapse Expand Jashandeep Singh Jashandeep Singh Jashandeep Singh Follow Joined Dec 31, 2023 • Jan 9 '24 Dropdown menu Copy link Hide Thanks Code of Conduct • Report abuse
neat. that happens more often than we'd wanted to.
btw, i usually do
sudo kill -9 $(sudo lsof -t -i:3000)to get the job done real quick.Nice, that's a pretty simple way of doing it
Sounds a bit pointless, given how linux already has the right tools for the job 🤔
yeah I don't think you need a separate package for it either really. I guess it's just a wrapper for the basic linux commands.
It's a lot of code for what could essentially be a one-liner though 😐
Unless many of your servers are running windows, it doesn't just sound pointless, but actually is.
Nice. I wrote a small CLI tool to help you also do this. Cross platform ofc.
npmjs.com/package/kill-port-process
Good tip.
Thanks