Иногда бывает ситуация когда dev-сервер по какой-либо причине не закрылся и висит в процессах, занимая порт.
Это может быть из-за падения IDE или просто сам забыл погасить и закрыл терминал.
Для таких случаев я набросал простую функцию с командой:
kill_on_port() {
port=$(lsof -t -i:$1)
echo "KILL PROCESS:" $port
sudo kill -9 $port
}
alias killonport="kill_on_port $@"
Код поместить в ~/.bashrc и рестартнуть систему.
Если во время старта dev-сервера получаете ошибку что порт уже занят, просто выполните команду, подставив свой порт.
Bash
kill_on_port 8000
Скорее всего бесполезно, если другой процесс назначен на перезапуск вашего dev-сервера в случае падения.
Имя команды можете изменить на любое другое.
#linux
⚠️ We’ve been silent since September 9 on X (twitter) after our account was hacked, but we’ve just recovered it. This came as Venezuela faces new imperialist threats, while VA continues countering mainstream media lies.
👉 Stay tuned for lots of new content: x.com/venanalysis
#Venezuelanalysis
⚠️ Our X (Twitter) account @venanalysis has been hacked, just as US military threats against Venezuela intensify and mainstream media joins the chorus.
We’re working to recover it.
👉 Stay tuned here for updates.
#Venezuelanalysis
Venezuelanalysis is an independent outlet, free from corporate and political backers. Our mission to report on Venezuelan grassroots struggles is unwavering, but we need your support!
📍Make a one-time donation or subscribe to help us reach our goal here: https://venezuelanalysis.com/donate/
#Venezuelanalysis#IndependentJournalism#IndependentMedia#Fundraising
Oppose Trump’s War, Support Venezuelanalysis!
For over 20 years, we’ve stood with the Venezuelan people in their struggle for sovereignty. We’ve exposed US-backed aggression, documented grassroots resistance, and challenged dishonest media narratives.
Every contribution keeps this work alive. Click here to donate 👉https://venezuelanalysis.com/donate/
#Venezuelanalysis#Fundraising2025#IndependentMedia#Venezuela#SupportIndependentMedia
Fundraising 2025! 💪
We launch our yearly fundraising at a moment that feels more critical than ever. With Trump openly threatening to attack Venezuela and the corporate media beating the war drums, independent media must fight back.
For years, Venezuelanalysis has reported from the ground with accuracy and integrity; from documenting popular power to exposing dishonest narratives around sanctions. Today, our task is clear: counter war propaganda and defend peace and Venezuelan sovereignty.
Our work is 100% supported by readers and followers. That’s what keeps us independent. If you value this project, please consider making a donation or becoming a subscriber. Every contribution strengthens our ability to continue reporting in this historic moment.
Click here to donate 👉https://venezuelanalysis.com/donate/
#Venezuelanalysis#Fundraising2025#IndependentMedia#Venezuela#SupportIndependentMedia
🎥 VIDEO | Venezuela's Workers: Bonuses, Frozen Wages, and a Labor Law Under Threat
Venezuela’s minimum wage remains frozen while worker income is increasingly tied to discretionary bonuses. At the same time, proposed changes to the country’s landmark labor law are raising alarm among labor organizations.
Are workers’ rights being quietly dismantled?
Watch the video to learn more: https://youtu.be/rJJLUiLj2NQ
#Venezuela#WorkersRights#LaborLaw#WorkingClass#Venezuelanalysis