Иногда бывает ситуация когда 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
🌟 Applications for YPIP 2026 are NOW OPEN! 🌟
Are you ready to launch your professional journey next summer?
The Young Professional Internships Program (YPIP) provides university students from Uzbekistan the opportunity to strengthen their professional skills through summer internships with leading companies, NGOs, and organizations in Tashkent.
✅ Participants will:
- Gain hands-on work experience in business, STEM, and other fields
- Take part in professional development workshops and field trips
- Network with peers, mentors, and industry leaders
- Receive guidance from established professionals
🌠 Eligibility:
- Commitment to a career in business or STEM
- Citizens of Uzbekistan, currently residing in the country
- Enrolled at a local university as a 3rd or 4th-year student, or graduating by May 2026
- Proficiency in English
⏰ Application Deadline: December 8, 2025
🔗Link to the application
Young Professional Internships Program (YPIP) is funded by the U.S. Embassy in Tashkent and implemented by American Councils for International Education.
#YPIP2026#Internships#YouthOpportunities
🎓Applications for YPIP 2026 are NOW OPEN!
Are you ready to launch your professional journey next summer?
The Young Professional Internships Program (YPIP) provides university students from Uzbekistan the opportunity to strengthen their professional skills through summer internships with leading companies, NGOs, and organizations in Tashkent.
🟣Participants will:
- Gain hands-on work experience in business, STEM, and other fields
- Take part in professional development workshops and field trips
- Network with peers, mentors, and industry leaders
- Receive guidance from established professionals
✔️Eligibility:
- Commitment to a career in business or STEM
- Citizens of Uzbekistan, currently residing in the country
- Enrolled at a local university as a 3rd or 4th-year student, or graduating by May 2026
- Proficiency in English
⏰ Application Deadline: December 8, 2025
📌Link to the application
Young Professional Internships Program (YPIP) is funded by the U.S. Embassy in Tashkent and implemented by American Councils for International Education.
#YPIP2026#Internships#YouthOpportunities