PostgreSQL
coub
express.js
freeware
git
jquery
laravel
links
linux
macos
mysql
node.js
php
powershell
python
ubuntu
vim
virtualbox
анекдот
блог
игры
интересно
стихи
цитаты
Powershell - Kill process
October 08, 2024
Almost same simple as ps ax | grep someth + kill -9 id
Full process list
Full process list
Get-ProcessResult
PS7 X:\Work> Get-Process NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName ------ ----- ----- ------ -- -- ----------- 10 2,73 7,12 0,00 2504 0 amdfendrsr 20 6,74 17,40 0,00 3216 0 AppHelperCap 23 25,14 27,88 0,14 16676 1 ApplicationFrameHost 16 4,21 13,35 0,00 3100 1 atieclxx 10 1,99 6,41 0,00 2512 0 atiesrxx ......Find process by name
Get-Process -Name *qbit*Result
PS7 X:\Work> Get-Process -Name *qbit* NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName ------ ----- ----- ------ -- -- ----------- 151 132,88 156,22 5,67 10332 1 qbittorrentKill that process by Id
Stop-Process -Id 10332It's done.
powershell + ssh agent (+git rem)
August 02, 2024
Usual error in ps console looks like this
Let's fix this
Take a look on startup type
Admin privileges needed
Next, let's start this one and check
Original solution is here
REM
In case you always have password request on git pull/push even you have already added (ssh-add ~/.ssh/my-key-file-name) your ssh secret key, you have to set up environment variable for Win10
May be useful
$HOME\.ssh\config example (for sure you need to set up your own hostname, user & key file name)
In case you want to force passsword you can set up host like this
+ Useful commands
Starting ssh-agent on Windows 10 fails: "unable to start ssh-agent service, error :1058"
Let's fix this
> Get-Service ssh-agent Status Name DisplayName ------ ---- ----------- Stopped ssh-agent OpenSSH Authentication Agent Then check that the service has been disabled by running
Take a look on startup type
> Get-Service ssh-agent | Select StartType StartType --------- Disabled
Admin privileges needed
> Get-Service -Name ssh-agent | Set-Service -StartupType Manual
Next, let's start this one and check
> Start-Service ssh-agent > Get-Service ssh-agent Status Name DisplayName ------ ---- ----------- Running ssh-agent OpenSSH Authentication Agent
Original solution is here
REM
In case you always have password request on git pull/push even you have already added (ssh-add ~/.ssh/my-key-file-name) your ssh secret key, you have to set up environment variable for Win10
Name | Value ---------------- GIT_SSH | C:\Windows\System32\OpenSSH\ssh.exeOr, set up your personal ssh path if needed.
May be useful
$HOME\.ssh\config example (for sure you need to set up your own hostname, user & key file name)
Host github.com HostName github.com User git PreferredAuthentications publickey AddKeysToAgent yes IdentityFile ~/.ssh/my-gh-private-key
In case you want to force passsword you can set up host like this
Host my-host.com HostName my-host.com User my_login PreferredAuthentications password
+ Useful commands
ssh-add -l # show added keyfiles ssh-add -D # delete added keys Start-Service ssh-agent # Admin access needed Stop-Service ssh-agent # Admin access needed