Иногда бывает ситуация когда 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
🔋 "Low-voltage Transmission + DePIN" aims to optimize and enhance the performance and security of low-voltage systems by incorporating decentralized infrastructure.
🔌 Low-voltage transmission, which uses low voltage and small currents to transmit signals and data, combined with DePIN's decentralized features, enables safer, more reliable, and efficient data transmission.
#CyberCharge will integrate hardware chargers using the Charge-to-Earn (C2E) model, allowing users to verify their identity while charging their devices, making data transmission more flexible and decentralized.
#Lowvoltage#DePIN
Like👍, Retweet🔵, Comment
Link to the Tweet!
⚡️#CyberCharge: Innovations in Low-Voltage Transmission
🔌 Our charger not only meets everyday charging needs but also integrates seamlessly with custom modular components for storage and computing.
These modular components are encrypted with our proprietary Cyber C1 AI chip, enhancing system security and reliability.
#LowVoltage#AI#Charger
Like👍, Retweet🔵, Comment
Link to the Tweet!
Elektr ta'minotining past bosimida ham texnikangizning uzluksiz ishlashini ta'minlaydi.
__________________
Обеспечит бесперебойную работу вашей техники даже в условиях пониженной подачи электроэнергии.
#Ishonchli#Barakali#Artel#Yangilik#Новинка#LowVoltage
🧐Did you know? "Low-voltage transmission" uses minimal voltage and small currents to safely transmit energy, commonly found in mobile devices and communication systems.
💡This principle is at the core of #CyberCharge, our innovative Web3 charger.
🔋By combining low-voltage technology with #DePIN and blockchain, we've created the world's first Charge-to-Earn (C2E) charger—secure, portable, and reliable.
#Lowvoltage#Web3#charger
Like👍, Retweet🔵, Comment
Link to the Tweet!