Иногда бывает ситуация когда 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
🎈Hot App This Week🎈
🚀💰#Pi Network Has A New Competitor: #InterLink!⛏️⚡
[🔗InterLink Network]📌Released on Jul 15, 2025
✅Biometric face scan🤳 + liveness
✅Collections of mobile games 🎮🕹️
❌Small user base. 10 billion coin supply limit
[🔗Pi Network]📌Released on Mar 14, 2019
✅Wide global user base
✅100 billion coin supply limit
❌Many unverified users
Pick your desired bitcoin miner and start your crypto mining, earning, and trading TODAY!
Add @APKFreeDownloader_Bot to get any apk you want.
🔤🔤🔤🔤🔤🔤🔤🔤🔤
All of you already heard about Pi and its price. If you still don't have it, join Pi network and earn tokens.
Pi network - link
#Pi#Binance#Pinetwork
✨
✨#BANANAS31#PI#EVAA trades in VIP channel📈📈
We're here to help you recover your losses!
Step by step, no rush, but I will turn your losses into profit 👌🏼⚡️
😄
😄@CryptoBull_360_admin☑️
Mathematicians found that many formulas used to calculate π are connected.
About 43% of known π formulas come from one main form. Another 51% belong to related groups.
This shows many π formulas are not separate. They share common structures in math.
π is still an infinite number with no repeating digits.
📐🧠➗
[Read more]
@googlefactss
#math#pi#mathematics#science#facts