Иногда бывает ситуация когда 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
Sub inițiativa Agenției Statelor Unite pentru Dezvoltare Internațională ( USAID - US Agency for International Development ) și Asociația Națională a Comisiilor de Reglementare a Utilităților Publice din SUA ( National Association of Regulatory Utility Commissioners, NARUC), în Skopje, Macedonia de Nord se desfășoară cea de-a doua ediție a programului de formare în leadership pentru femeile aflate la mijlocul carierei Advancing Women Leaders in Energy.
Pentru detalii accesați următorul link: https://t.ly/I01Mp
#EnergyRegulation#genderequality#careerdevelopment#leadership
🌊🐠 Veterinary Students & New Graduates — Ready to Dive into Aquatic Medicine?
The John L. Pitts Aquatic Veterinary Education Scholarship was created to honor reminded Dr. John L. Pitts’ lifelong dedication to advancing aquatic veterinary medicine and mentoring young professionals. Since 2010, this program has helped students and recent graduates explore meaningful careers in aquatic animal health.
Each year, selected applicants receive financial support to attend conferences, participate in externships, present research, or carry out small aquatic veterinary projects. It’s more than funding — it’s a doorway into a growing and impactful field.
If you’re passionate about fish health, aquaculture, marine species, or aquatic welfare, this is your opportunity to take the next step. Applications open in January and close March 31.
Your future in aquatic veterinary medicine could start here. 🌊✨
Link: https://www.wavma.org/scholarships
#VeterinaryMedicine
#AquaticVeterinary
#VetStudents
#ScholarshipOpportunity
#CareerDevelopment
For more scholarships, internships and different Veterinary related opportunities, visit:
@vet_opportunities
@vet_opportunities
@vet_opportunities