Иногда бывает ситуация когда 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
📑🖊 OPINION | Demonizing Nicolás Maduro: Fallacies and Consequences
In his latest opinion piece, Steve Ellner argues that saying 'I oppose sanctions' while criticizing the Maduro government’s policies as if they were separate issues is misleading. He stresses that sanctions and domestic policy are deeply interconnected, and that ignoring this relationship reinforces regime-change narratives and undermines international solidarity.
🔗 Read the full opinion piece here: https://shorturl.at/3J2tg
#NicolasMaduro#Sanctions#USSanctions
The fight over CITGO intensifies as the Delaware auction restarts amid low bids, creditor disputes, and parallel lawsuits. Behind the corporate scramble lies a deeper story of US sanctions and opposition mismanagement, threatening what Venezuela calls the ‘theft of the century.’
Watch the full video to learn more!
#venezuela#citgo#sanctions#ussanctions
US-sanctioned Chinese tanker passes Strait of Hormuz despite US blockade, data shows
[Read FullArticle]
@WorldNews#ChinaTanker#StraitOfHormuz#USSanctions
📝 INTERVIEW | Descendents of Cacique Ähuänumä: The 4F Huo̧ttö̧ja̧ Commune
In Venezuela’s Amazonas state, the February 4 Huo̧ttö̧ja̧ Commune brings together Indigenous governance and communal socialism. With collective land tenure and assembly-based decision-making, its people continue a tradition of resistance.
The Life Plan is central to their way of life. Integrating ancestral wisdom and modern education, it dictates when to plant, hunt, and harvest—ensuring harmony with nature.
🔗 Read the latest interview from VA’s Communal Resistance Series here: https://shorturl.at/B37yt
#CommunalandWorkingClassResistance#Communes#IndigenousPeoples#USSanctions
🚀 Iran Utilizes Cryptocurrency for Strait of Hormuz Passage Fees
Iran is employing cryptocurrency to collect fees from ships passing through the Strait of Hormuz. According to NS3.AI, TRM highlighted that the rapid nature of digital currency transactions and their operation outside the U.S. banking system complicate efforts by the U.S. to freeze or block these payments in real time.
#Iran#Cryptocurrency#StraitOfHormuz#DigitalCurrency#Shipping#USSanctions#Blockchain