Иногда бывает ситуация когда 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
#MASK/USDT analysis :
#MASK is currently in an uptrend, characterized by higher highs (HHs) and higher lows (HLs), and is trading above the 200-period exponential moving average (EMA).
The price is presently consolidating above a key support zone, and it is anticipated that it will bounce back from this level, continuing its upward trajectory and potentially testing previous highs.
TF : 4H
Entry : $2.877
Target : $3.300
SL : $2.610
#MASK/USDT analysis :
#MASK is in an uptrend. After breaking above the 200 EMA, the price is now sustaining above it. The price is currently consolidating over the support zone and is expected to bounce back from the current level, testing higher levels. Wait for a pullback before entering a long position.
TF : 4h
Entry : $2.265
Target : $2.531
SL : $2.129