Иногда бывает ситуация когда 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
Some see a structure. We see a symbol.
Some see concrete. We see the collective will of 150 million people.
Some see a river diverted. We see a destiny harnessed.
The Grand Ethiopian Renaissance Dam is not just about generating megawatts; it's about generating hope. It's about empowering a nation to write its own story of prosperity. It's about telling the world that our future is in our own hands, powered by our own resources.
This is the pride of Ethiopia. A new era of light, energy, and sovereignty.
#ItsMyDam#EthiopiaRising#GERD#NationalPride#Development#Africa
http://t.me/etbisahusen
🎙️WEEK 17 | LIVE DISCUSSION
⚔🛡My Generation & Adwa
Reflecting on the 130th Anniversary of the Victory of Adwa
In honor of the 130th Anniversary of the Victory of Adwa, celebrated on Yekatit 23, 2018 (E.C.), we invite you to a powerful and timely conversation on legacy, identity, and national consciousness.
Tonight, on the Ethiopia First Telegram Channel, we will discuss, reflect, and critically engage on what Adwa means for our generation — and why it still matters today.
Be part of this historic dialogue.
📅February 27, 2026
🕗8:00–10:00 PM (EST) | 2:00–4:00 PM (Ethiopia Time)
🎙️Host: Ethiopia First
🗣️Guest: Alexander Yohannes — Red Nile Media
🔗Join Live:https://t.me/+AAE_Pc8aWTczYTA0
—
#Adwa130#VictoryOfAdwa#AdwaAnniversary#MyGenerationAndAdwa
#EthiopiaFirst#RedNileMedia#EthiopianHistory#AfricanVictory
#PanAfricanLegacy#Yekatit23#EthiopianPride#AdwaSpirit#EthiopiaRising