powershell相关:

Windows hello保护ssh私钥

ssh-keygen -t ecdsa-sk -f $env:USERPROFILE\.ssh\happy_hello
code %USERPROFILE%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt

历史记录 Windows 双系统 主板时差

reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f

Hyper-V开启嵌套虚拟化

Get-Vm
Set-VMProcessor -ExposeVirtualizationExtensions $true -VMName name

hyper-v相关:

vm管理工具

winget install –id=VMPlex.VMPlex -e -s winget

查看vm虚拟机

get-netadapter | Where-Object {$_.InterfaceDescription -match "Hyper-V"} | Select-Object Name, InterfaceAlias

查询被占用的文件进程

winget install Microsoft.Sysinternals.Handle

handle "C:\path\to\your\file.txt"  # 完整路径
handle test.txt                    # 仅文件名(会搜索所有位置)
handle D:\docs                     # 搜索整个目录下的文件占用

Process Explorer

安装

Winget:winget install Microsoft.Sysinternals.ProcessExplorer

docker 避免每sudo

 # 1. 如果 docker 用户组不存在,先创建它(通常安装 docker 时已自动创建)
 sudo groupadd docker
 # 2. 将当前用户(也就是你终端登录的用户)加入 docker 组
 sudo usermod -aG docker $USER
 # 3. 刷新用户组权限,使其立即生效(不用退出重新登录)
 newgrp docker