Иногда бывает ситуация когда 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
Who Is Behind the Alleged Genocide Against Christian (Amhara) Communities in East Arsi, Ethiopia? – and When Will this Stop?
https://borkena.com/2026/03/03/ethiopian-orthodox-christians-who-is-behind-the-alleged-genocide-against-christian-amhara-communities-in-east-arsi-ethiopia/#Ethiopia#humanrights#Arsi
The Unspoken Crisis of Ethiopian Orthodoxy. Read more.
https://borkena.com/2026/03/15/ethipoia-the-unspoken-crisis-of-ethiopian-orthodoxy/#Ethiopia#Orthodox#Arsi
Oromo Liberation Army Points Finger At Abiy Ahmed’s Admin. Over Arsi Massacre. Read more.
https://borkena.com/2026/03/04/ethiopia-oromo-liberation-army-points-finger-at-abiy-ahmeds-admin-over-arsi-massacre/#Ethiopia#OLA#Arsi
Three Orthodox Christians Reportedly killed in Arsi, Oromia region. Read more.
https://borkena.com/2026/02/25/ethiopia-three-orthodox-christians-reportedly-killed-in-arsi-oromia-region/#Ethiopia#News#OrthodoxChristians#Arsi#Orthodox
Death Toll From Arsi Massacre Rise To 34 as killing Orthodox Christian Continues. Read more.
https://borkena.com/2026/03/03/ethiopia-death-toll-from-arsi-massacre-rise-to-34-as-killing-orthodox-christian-continues/#Ethiopia#Arsi#humanrights#Oromia#OrthodoxChristians
Did the World Council Of Churches erred about the Massacre in Arsi?
https://borkena.com/2025/11/15/ethiopia-world-council-of-churches-condemns-all-acts-of-violence-in-ethiopia/#Ethiopia#News#OrthodoxChristianchurch#Ethiopia#WorldCouncilofchurches#Arsi
Systematic Persecution in Oromia: The Role of Militias and Political Actors in Targeting Ethiopian Orthodox Christians. Read more. https://borkena.com/2025/11/05/systematic-persecution-in-oromia-the-role-of-militias-and-political-actors-in-targeting-ethiopian-orthodox-christians/#Ethiopia#Orthodox#OrthodoxChristians#OromiaMassacre#Arsi