在当前文件夹打开 Windows 终端
让新开的终端直接定位到你正在操作的文件夹,省去手动 cd。
运行 wt -d . ,新开的 Windows 终端窗口会自动定位到当前文件夹。
01命令
命令
$ wt -d .02作用说明
wt.exe 启动器用 -d 参数指定起始目录,. 代表当前所在文件夹,打开后无需再手动切换。命令提示符和 PowerShell 里都可以用,也可以换成任意路径,例如 wt -d C:\Projects。反过来,在文件资源管理器的地址栏直接输入文件夹路径可以打开文件夹,输入 cmd 或 powershell 则会在该文件夹打开对应终端。Windows 10 上如未预装 Windows Terminal,需先从 Microsoft Store 安装。
03风险
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- Windows Terminal command line arguments依据: wt -d <path> starts Windows Terminal with the given working directory; -d . uses the current folder.
- Windows Terminal wt.exe reference依据: Documents wt.exe command-line options including -d for the starting directory.
最后验证: 2026-09-18 · 分类: 文件与文件夹