Иногда бывает ситуация когда 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
Why We’re Here. Why Now. 🚫👑
Look, we all feel it. Whether you’re on the left, the right, or somewhere in the middle—it doesn’t matter. This isn't about a political party. This is about the fact that we were never meant to be subjects. We were meant to be Citizens.
The "No King" movement isn't just a hashtag; it’s a wake-up call. We’re watching a system where the elites act like royalty while the rest of us struggle to keep our heads above water. If we don't stand up now, if we stay silent, the future won't belong to us—it’ll belong to those who think they own us.
We get it. Not everyone can march in the streets. Not everyone can be on the frontlines. Some of you are busy working two jobs, raising kids, or just trying to survive. But in your heart, you know the current path is broken. You know things must change.
How can you help? It’s simple. Truth is our greatest weapon. Smallest act of defiance? Share. Share the posts here. Spread the word. Don't let the "official" narrative be the only one people hear.
We aren't asking for your vote. We’re asking for your voice.
No Masters. No Monarchs. No Kings. ⛓
#NoKings#PowerToThePeople#TheUnruled#AmericaAwakened
✈️📣t.me/No_king_No_King
Why We’re Here. Why Now. 🚫👑
Look, we all feel it. Whether you’re on the left, the right, or somewhere in the middle—it doesn’t matter. This isn't about a political party. This is about the fact that we were never meant to be subjects. We were meant to be Citizens.
The "No King" movement isn't just a hashtag; it’s a wake-up call. We’re watching a system where the elites act like royalty while the rest of us struggle to keep our heads above water. If we don't stand up now, if we stay silent, the future won't belong to us—it’ll belong to those who think they own us.
We get it. Not everyone can march in the streets. Not everyone can be on the frontlines. Some of you are busy working two jobs, raising kids, or just trying to survive. But in your heart, you know the current path is broken. You know things must change.
How can you help? It’s simple. Truth is our greatest weapon. Smallest act of defiance? Share. Share the posts here. Spread the word. Don't let the "official" narrative be the only one people hear.
We aren't asking for your vote. We’re asking for your voice.
No Masters. No Monarchs. No Kings. ⛓
#NoKings#PowerToThePeople#TheUnruled#AmericaAwakened
✈️📣t.me/No_king_No_King
A guy whose rap sheet for pedophilia is growing day by day shouldn't be anywhere near a position of power in this country.
#NoKings
#TheUnruled
#AmericaAwakened
#Epsteinfile
✈️📣t.me/No_king_No_King