VMware Workstation常用操作记录
安装官方下载链接123456789101112131415https://download3.vmware.com/software/wkst/file/VMware-workstation-full-10.0.7-2844087.exe 上面的版本不支持64位Windows系统 https://download3.vmware.com/software/wkst/file/VMware-workstation-full-12.0.0-2985596.exe https://download3.vmware.com/software/wkst/file/VMware-workstation-full-12.5.4-5192485.exe https://download3.vmware.com/software/wkst/file/VMware-workstation-full-12.5.5-5234757.exe https://download3.vmware.com/software/wkst/file/VMware-workstation-full-12.5.9-7535481 ...
Windows搜索工具everything
无法弹出移动硬盘?设置👉🏻️索引👉🏻️NTFS和REFS取消勾选自动包含新增固定卷
排除搜索结果设置👉🏻️索引👉🏻️排除列表👉🏻️添加筛选器
1234$RECYCLE.BIN*AppData\Roaming\Microsoft\Windows\Recent**Windows\Prefetch**AppData\Local\Packages\Microsoft.Windows.Search_*
直接修改配置文件需要将everything进程完全停止后才能进行修改,不然everything关闭的时候会覆盖手动修改的配置文件。
退出everything
停止everything服务1net stop everything
配置文件地址:%appdata%\Everything\Everything.ini修改其中一行
1exclude_folders="$RECYCLE.BIN","*AppData\\Roaming\\Microsoft\\Windows\\Recent*","*Windows\\Prefetc ...
Ubuntu_Charmed_Kubernetes
官方文档: https://ubuntu.com/kubernetes/docs
开始之前集群ip规划,所有机器系统都是ubuntu 20.04
hostname
ip
juju-client
10.0.0.10
juju-controller-1
10.0.0.11
juju-master-1
10.0.0.21
juju-master-2
10.0.0.22
juju-master-3
10.0.0.23
juju-worker-1
10.0.0.31
juju-worker-2
10.0.0.32
juju-client 为juju客户端和haproxy机器juju-controller-1为juju控制器节点(可以做高可用)
以下操作都是在juju-client上执行
安装juju1sudo snap install juju --classic
设置云类型12juju add-cloud输入manual
添加机器(一共5台)12juju bootstrapjuju add-machine ssh:root@x.x.x.x
...
搭建网关服务器
网关服务器的常见用途:1.企业局域网想要访问外网,可以使用网关服务器上网2.可以一个网卡连接公网,一个网卡连接局域网交换机,让网关服务器做路由器使用
Windows 平台外网适配器打开共享打开 控制面板\网络和 Internet\网络连接右键外网网卡, 属性, 共享
允许其他用户通过此计算机的Internet连接来连接
注意: 外网打开允许其他用户连接后,内网的IP地址会自动改变,这时候得手动修改一下内网适配器的IP地址.
内网机器设置
内网机器网关配置成 网关服务器 的内网IP
注意:内网适配器的固定IP不要填写网关,否则会导致路由混乱.
Liunx服务端(用firewalld)
多网卡机器做网关做nat转发, 局域网其他机器需要配置网关地址.
开启内核转发
123sudo vim /etc/sysctl.conf---net.ipv4.ip_forward = 1
立即生效
1sudo sysctl -p
开启 NAT 转发
12firewall-cmd --permanent --zone=public --add-masqueradefirewall-cmd ...
Windows系统隐藏文件
attrib 命令
这个只是隐藏, 并没有把文件加密
1attrib +S +H <文件或文件夹>
优点: 不用加密解密, 访问简单
缺点: 不安全
创建vhd并使用bitlocker在磁盘管理里面创建vhd磁盘, 挂在好后使用BitLocker加密(可选)
优点: 数据安全,没有密码无法解密
缺点: 容易损坏,造成数据全部丢失
使用第三方加密软件略
使用压缩软件加密略
Windows使用命令操作进程
查找进程1tasklist | findstr xxx
根据进程名杀进程1taskkill /F /IM npc.exe
根据进程PID杀进程1TASKKILL /PID 1230 /PID 1241 /PID 1253 /T
Windows隐藏cmd运行窗口
使用开源软件实现(推荐)
hidecon.exe 官网地址
使用方法,将hidecon.exe和其他可执行放在一块,在bat脚本前面加上
12hidecon.exenpc -server=xxx:8888 -vkey=xxxxxxxxxxxxxxxx -type=tcp
使用vbs实现(推荐)1CreateObject("WScript.Shell").Run "D:\syncthing\syncthing.exe",0
或者批量运行:
1234Set ws = CreateObject("Wscript.Shell")ws.run "cmd /c start 1.exe",vbhidews.run "cmd /c start 2.exe",vbhidews.run "cmd /c start 3.exe",vbhide
复制保存成vbs文件即可。
使用cmd实现(会有一闪而过的黑窗)12345@echo offif "%1"==" ...
Linux常用命令之awk
awk 多个分隔符12echo "abcdefg" | awk -F '[ce]' '{print $1,$2,$3}'ab d fg
但是我想要提取dmesg里面的时间,想以[]来做分割,这个时候可以反写[]取个巧
1dmesg | awk -F '[][]' '{print $2}'
打印某一列为特定值的行1awk '$8=="500"' nginx_access.log
awk 交换一个文件的两列比如文件test.txt
1234a;b;cd;e;f1;2;34;5;6
方法11awk -F ';' '{printf("%s;%s;%s\n",$3,$2,$1)}' test.txt
方法2123awk -F ';' '{temp = $3 ; $3 = $1; $1 = ...
WSL常用操作记录
常用操作导出1wsl --export centos7 centos7.tar
导入1wsl --import centos7 C:\centos7 centos7.tar
启动指定发行版1wsl -d centos7
指定用户启动1wsl -d ubuntu -u root
开机自启WSL1WSL2和Windows11win+r 输入 shell:startup写一个wsl_start.bat内容如下
1wsl -d Ubuntu -u root /etc/init.d/ssh startsudo vim /etc/wsl.conf
12[boot]command = service docker start
修改默认用户为rootWSL1WSL2和Windows111%localappdata%\Microsoft\WindowsApps\ubuntu.exe config --default-user root
根据你的发行版决定
sudo vim /etc/wsl.conf
12[user]default = root
...
Windows右键菜单添加md5、sha1校验
此方法依赖powershell, win10没问题,win7没测试
安装123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\*\shell\hash]"MUIVerb"="校验文件 Hash""SubCommands"="""Icon"="PowerShell.exe"; SHA1[HKEY_CLASSES_ROOT\*\shell\hash\shell\01menu]"MUIVerb"="SHA1"[HKEY_CLASSES_ROOT\*\shell\hash\shell\01menu\command]@="powershel ...