1. SSH
https://docs.microsoft.com/zh-cn/windows-server/administration/openssh/openssh_overview
2. 命令行shell
https://docs.microsoft.com/zh-cn/windows-server/administration/windows-commands/windows-commands
2.1 关机命令
shutdown -s 一分钟后关机
shutdown -s -t 0 立即关机(单位是分钟)
shutdown -r 一分钟后重启
shutdown -r -t 0 立即重启
shutdown -? 查看命令说明
shutdown -a 取消操作
2.2 设备命令
sc config i8042prt start= disabled 禁用键盘
sc config i8042prt start= auto 启动键盘
systeminfo 获取电脑的系统配置
Get-PhysicalDisk 获取磁盘信息(powershell使用)
Dxdiag 诊断系统信息(运行命令)
2.3 关闭端口号
netstat -ano|findstr 3000 查询3000端口的pid
taskkill /PID 22876 /F 关闭进程的pid
2.4 文件命令
``` mkdir img 创建一个img目录文件, 可以简写成md rmdir img 删除空目录img, 简写rd rd/S img 删除非空目录img, 需要Y/N同意 rd/S/Q img 直接删除img目录(.\img, powershell中带上参数不起作用)
cd >hello.txt 删除htllo.txt文件 del hello.txt 删除txt文件 del *.txt 删除目录下所有的txt文件
<a name="14480d266061fefba887df1fadf6ed1a"></a>
### 2.5 wmic模式
wmic 进入wmic模式
cpu get name 获取cpu名称 cpu get numberofcores 获取cpu的核数 cpu list full 获取cpu的的列表信息
<a name="Q4mss"></a>
### 2.6 防火墙
```bash
netsh advfirewall show allprofile state # 查看防火墙
netsh advfirewall set allprofiles state off/on # 关闭/开启所有防火墙
2.7 软件命令
d: 切换盘符
powershell 脚本控制台
shell:startup 开机启动目录
calc 打开计算机
gpedit.msc 组策略
mspaint 画图软件
mstsc 远程连接
2.6 程序命令
start ./hello.exe 启动文件(后台运行)
call ./hello.exe 启动文件(在当前窗口)
3. 常用设置
3.1 磁贴设置
3.2 去掉提示音
3.3 关闭粘滞键
3.4 设置自动开机
3.5 Alt + Tab
4. window terminal
官网链接: https://docs.microsoft.com/zh-cn/windows/terminal/
主题仓库: https://github.com/mbadolato/iTerm2-Color-Schemes/tree/master/windowsterminal
4.1 安装
// 需要在powershell中运行(注意要先从gitHub中下载这个安装包), 或者在window商城中下载
Add-AppxPackage ./Microsoft.WindowsTerminal_1.0.1401.0_8wekyb3d8bbwe.msixbundle
4.2 快捷键
4.3 配置文件
https://zhuanlan.zhihu.com/p/272082726
{
"$schema": "https://aka.ms/terminal-profiles-schema",
// 默认的gui
"defaultprofile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
// 将copyonselect设置为true, 可将选定的文本自动复制到剪贴板, 而无需按ctrl+shift+c;
"copyonselect": false,
// 将copyformatting设置为false, 即可仅复制纯文本而无需任何样式 (我希望这是所有应用程序的默认设置)
"copyformatting": false,
// gui窗口设置
"profiles": {
"defaults": {
},
"list": [
{
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", // 唯一标识符(必填)
"name": "windows powershell",
//"source": "", // 配置文件生成器,仅在自动添加了配置文件且不得对其进行编辑时使用
"commandline": "powershell.exe", // 假定未设置source的情况下运行的可执行文件
"hidden": false,
"backgroundimage ": "c:\\users\\v_vqcailiu\\desktop\\wallhaven-8ogod1.jpg",
},
]
},
// 主题设置
"schemes": [],
// 快捷键设置
"actions": []
}