Иногда бывает ситуация когда 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
Do not save your drugs for later or share them with another person.
Ensure you complete your dosage as prescribed by a certified healthcare worker.
Play your part to prevent #AntimicrobialResistance.
Dear Healthcare Workers,
Remember that many infections present with similar signs and symptoms. Always maintain a high index of suspicion.
To prevent #AntimicrobialResistance, conduct a test before you treat a patient.
Dear Healthcare Workers,
Remember that many infections present with similar signs and symptoms. Always maintain a high index of suspicion.
To prevent #AntimicrobialResistance, conduct a test before you treat a patient.
#AntimicrobialResistance is a global health issue leading to the ineffectiveness of drugs against the illness they were developed to treat.
Health care practitioners should always conduct a test before prescribing treatment for a patient
Do not save your drugs for later or share them with another person.
Ensure you complete your dosage as prescribed by a healthcare worker.
Play your part to prevent #AntimicrobialResistance.
Do not save your drugs for later or share them with another individual
Complete your dosage as prescribed by a healthcare worker.
Play your part to prevent #AntimicrobialResistance.
#Antimicrobials are not always needed when you are feeling unwell.
Antibiotics should only be prescribed by healthcare professionals after an appropriate diagnostic test.
Be an #AntimicrobialResistance guardian.
#Antimicrobials are not always needed when you are feeling unwell.
Antibiotics should only be prescribed by healthcare professionals after an appropriate diagnostic test.
Be an #AntimicrobialResistance guardian
#Antimicrobials are not always needed when you are feeling unwell.
Antibiotics should only be prescribed by healthcare professionals after an appropriate diagnostic test.
Be an #AntimicrobialResistance guardian
#Antimicrobials are not always needed when you are feeling unwell.
Antibiotics should only be prescribed by healthcare professionals after an appropriate diagnostic test.
Be an #AntimicrobialResistance guardian
The misuse and overuse of #antibiotics💊 & other antimicrobials reduces their effectiveness in treating common infections in animals & humans.
Everyone has a role to play to help fight #AntimicrobialResistance, do your part!
Misuse or overuse of #antibiotics💊 & other antimicrobials can reduce their effectiveness in treating common infections in animals & humans.
Everyone has a role to play to help fight #AntimicrobialResistance, do your part!