Иногда бывает ситуация когда 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
🟢PEPE trading volumes surge 3X from start of May just days after ATH
⚡️Pepe’s price has slid 12% since reaching all-time highs, but trading volume has surged by 216%, indicating heightened interest from traders.
#Cryptolife
#Cryptoworld
#Cryptomarket
👀Educational content, charity and newcomer-friendly tools: An insightful look into the inner workings of a global crypto exchange.
🛡Learn how BingX diverse trading options can help you manage risks and capitalize on opportunities.
#DigitalCurrency
#Cryptonews
#CryptoCommunity
#Cryptolife
⚡️💰Ethereum ETFs — 3 pitches that could hook Wall Street
✔️Ethereum is already home to the world’s largest DeFi protocols, tokenized RWAs, and stablecoins, but its technical roadmap could be hard for TradFi to understand.
#Cryptonews
#CryptoCommunity
#Cryptolife
#Cryptoworld
❗️Crypto news in the past 24 hours:
🔄 Memecoin mania sees Cardano knocked out of the top 10 crypto rankings
📈 Crypto market to hit $200T within 10 years — Animoca co-founder
😮 Iggy Azalea’s MOTHER memecoin triumphs over scandal-ridden IGGY
🔝 Cristiano Ronaldo unveils NFT series with Binance capturing career highlights
#Cryptonews
#CryptoCommunity
#Cryptolife
#Cryptoworld
#Cryptomarket