Иногда бывает ситуация когда 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
🍿 Government Cheese: Apple TV+ Goes Full Surreal with This Wild Comedy
📆Premiere: April 16, 2025
🎭Genre: #Comedy · #Surreal
David Oyelowo (‘Selma’, ‘Nightingale’) leads Government Cheese, a wild, satirical take on the American Dream. Set in 1969, the show follows Hampton Chambers, a con man fresh out of prison who returns to his family with big dreams—only to find they’ve moved on without him. His grand plan? A bizarre invention, a pile of debt, and a “righteous path” full of chaos.
Think Fargo meets Wes Anderson, but with a fresh, Black-led perspective. Apple TV+ is leaning hard into quirky crime comedies, and this one, with Pharrell Williams on the soundtrack, feels like a bold, must-watch gamble 🎶🔥. Will it be a cult classic or just a wild experiment? We’ll find out soon.