Иногда бывает ситуация когда 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
#The_Economist🇬🇧📕[PDF]⬇️
15 #November2025
#Weekly_Magazines
For learning, for free(dom).
@backupofmagazines
This week’s Economist tracks how an emerging #AIBubble, volatile #Markets, and shifting #Geopolitics could reshape 2026. From Taiwan’s hidden economic risks to Mexico’s security crisis and Europe’s democratic strain, global fault lines widen. China faces birth-rate pressures and reputational challenges, while the U.S. wrestles with #Trumpforce, homeschooling, and e-bike parenting. Business pages explore #Chatbots, HR’s rise, and America’s “seven deadly sins.” Finance dives into “recession-recession” fears and personal-finance defence. Science highlights #AI superforecasting and whales’ vowel systems. A dense but essential issue for anyone tracking #Tech, #Policy, and global stability.
#The_Bloomberg🇺🇸📕[PDF]⬇️
#November2025
#Monthly_Magazines
For learning, for free(dom).
@backupofmagazines
This issue pits #GavinNewsom against a shifting #USPolitics map while probing the supposed #AIBubble, from frothy valuations to real-world productivity. A climate-forensics read asks whether #CloudSeeding worsened Dubai’s deadly storm—at the nexus of #ExtremeWeather and #ClimateChange. The geo-economics file tracks India’s wobbling investments, China’s expanding #Ports, and weaponized #SupplyChains. For investors, the issue weighs #ETFs, #401k tweaks, #BigTech concentration risk, and hedges in #Europe and #Gold. Lifestyle detours sample Utah powder and the dive-bar revival. It’s a brisk tour of power, money, and culture in a volatile world. #Markets#Investing#Energy#MiddleEast#Africa#Healthcare#Birkenstocks