Иногда бывает ситуация когда 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
😄Content
➖➖➖➖➖➖
🔘As an adjective, we use content to mean feeling happy and at peace with a situation.
🔜I felt content sitting by the fire, watching the rain outside.
🔘It can also mean you accept something that is out of your control.
🔜She was content with coming 3rd in the race.
🔘 As a noun, content means the ideas or information contained in something.
🔜I’m subscribed to her money-saving channel because the content is so interesting.
🔜Your writing is enjoyable but it lacks content – add more detail please.
🔘We can also use content to talk about the high or low amount of something contained in food and drink.
🔜Soya milk has a low fat content.
🔜This chocolate bar has a high sugar content.
🔘We hope the content of this video makes you feel more content with your English! And if you enjoy our content, like this video!
#Content👨🏫@America
➖➖➖➖➖➖➖➖➖➖➖➖
🆕 Crypto News @Money
😁 Crypto Game @Egame
🇺🇸 US News @America
🇯🇵 Japan News @Japan
🇦🇪 UAE News @Dubai
▶️ Popular Movies @Videos
😜 Best Funny Video @Funnys
https://secure.avaaz.org/community_petitions/ru/ministerstvo_informatsii_i_obshchestvennogo_razvit_ostanovite_veshchanie_rossiiskikh_telekanalov_na_territorii_respubliki_kazakhstan/?cibGOsb&utm_source=sharetools&utm_medium=copy&utm_campaign=petition-1427595-ostanovite_veshchanie_rossiiskikh_telekanalov_na_territorii_respubliki_kazakhstan&utm_term=cibGOsb%2Bru
Петиция за запрет РФ пропаганды на территории РК
#content
Louis William Wain, шизофрения и коты
#content
Кэмбербетч прекрасно играет аутистов и психически не стабильных - рекомендую The Electrical Life of Louis Wain