工具软件下载
生产力工具集
Windows Linux子系统 WSL
直接安装WSL2
适用于之前没有安装过WSL
1.如果之前没有用过 WSL,那么首先需要为Linux启用Windows子系统:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
2.安装 WSL2 之前,必须启用“虚拟机平台”可选功能
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
重新启动计算机以完成WSL安装并更新到 WSL2
3.安装适用于 x64 计算机的 WSL2 Linux 内核更新包
https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
4.完成之后,以管理员身份运行 PowerShell,执行如下命令来设置wsl使用的默认版本
wsl --set-default-version 2
这里我们将默认设置为 WSL2
5.接下来通过访问 Microsoft Store 来安装分发版 https://aka.ms/wslstore
或直接用命令安装:
wsl --install
6.查看 WSL 版本
wsl -l -v
win11下启用镜像网络 或 桥接
需要 Windows 11 版本 22H2 或更高版本,配置说明:https://learn.microsoft.com/zh-cn/windows/wsl/wsl-config
用户目录 %USERPROFILE% 下面创建一个配置文件 .wslconfig,按照如下配置方法设置网络,例如:
镜像
[wsl2]
networkingMode=mirrored
桥接
[wsl2]
networkingMode=bridged # 桥接模式
vmSwitch=my-switch # 你想使用的网卡
ipv6=true # 启用 IPv6
重启 WSL2
wsl --shutdown && wsl
将wsl2的ext4.vhdx文件移动到另外磁盘
1.查看已安装的linux发行版本
wsl -l -v
2.导出文件到D盘
wsl --export Ubuntu-20.04 d:\\wsl-ubuntu20.04.tar
3.注销当前分发版
wsl --unregister Ubuntu-20.04
4.重新导入并安装到D盘
wsl --import Ubuntu-20.04 d:\\ProgramData\\wsl d:\\wsl-ubuntu20.04.tar --version 2
5.设置默认登录为之前的用户名
ubuntu2004 config --default-user linfeng
6.删除文件 d:\wsl-ubuntu20.04.tar
7.设置默认版本
wsl -l -v
wsl --set-default Ubuntu-20.04
WSL2指定DNS
在WSL2中,您可以通过编辑/etc/wsl.conf文件并添加DNS配置来指定DNS。这里是一个示例配置:
[network]
generateResolvConf = false
这将禁用WSL的默认行为,即自动从Windows生成/etc/resolv.conf文件。
保存并关闭文件后,您需要创建自己的/etc/resolv.conf文件。您可以使用以下命令来创建:
nameserver 8.8.8.8
WSL2常用配置
$ cat /etc/wsl.conf
[network]
hostname=m4
generateResolvConf = false
generateHosts = false
重启WSL实例
wsl --shutdown
Win 10下开启Windows子系统WSL
1.程序和功能 - 启动或关闭Windows功能 - 适用于Linux的Windows子系统 勾选后确定,重启系统。
2.打开cmd,输入bash回车,提示访问一个网址,使用浏览器访问,
重定向到应用商店,然后可以获取需要的Linux子系统,比如Ubuntu
3.阿里云官方镜像站:https://developer.aliyun.com/mirror/
从WSL 1切换到WSL 2
WSL 2相比WSL 1有着更完整的虚拟环境,而且一些数据库比如mongodb在WSL 1下默认是无法使用的,所以果断升级:
升级步骤参考微软官方文档:https://docs.microsoft.com/zh-cn/windows/wsl/install-win10
升级过程需要注意2点:
1.使用power shell 管理员权限执行命名。
2.如果WSL 1已经有Linux环境,升级后要重启电脑。
windows ubuntu子系统设置默认root用户
1.在C:\Users\用户名\AppData\Local\Microsoft\WindowsApps路径下确认所安装的Linux子系统具体的版本号
2.然后打开CMD,输入XXXXXX版本号.exe config –default-user root运行,例如:
ubuntu2004.exe config –default-user root
WSL2 固定IP
在Windows 10中,以管理员权限运行CMD或Powershell,然后执行以下两个命令:
1.在Ubuntu中添加IP地址192.168.50.2,名为eth0:1
wsl -d Ubuntu -u root ip addr add 192.168.50.2/24 broadcast 192.168.50.255 dev eth0 label eth0:1
2.在Win10中添加IP地址192.168.50.1
netsh interface ip add address "vEthernet (WSL)" 192.168.50.1 255.255.255.0
将来,访问Ubuntu时将使用192.168.50.2,访问Win10时将使用192.168.50.1。 您可以将上述两行命令另存为.bat文件,然后将其放入引导区,并使其每次自动执行。
SSH远程连接到WSL2
1. 在WSL2下重装ssh
sudo apt-get remove openssh-server
sudo apt-get install openssh-server
2. 编辑sshd_config文件,修改几处配置
sudo vi /etc/ssh/sshd_config
- PermitRootLogin yes
- PasswordAuthentication yes
3. 编辑sudo vim /etc/hosts.allow,添加一行
sudo vim /etc/hosts.allow
- 添加的内容为 sshd: ALL
4. 成默认密钥短语,并重启ssh服务
ssh-keygen -A
sudo service ssh --full-restart
5. 查看WSL2 IP地址
ifconfig
6. 在windows下管理员权限打开cmd,输入命令将端口转发到WSL2
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=22 connectaddress=xxx.xxx.xxx.xxx connectport=22
此处xxx.xxx.xxx.xxx替换成wsl的IP地址,如172.18.195.3
7. cmd下查询windows的内网IP地址
ipconfig
8. 通过ssh命令或ssh工具进行连接
ssh root@yyy.yyy.yyy.yyy
重命名WSL2的linux发行版
编辑注册表:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss\{xxxxxxxxx-YOUR-GUID-HERE-xxxxxxxx}\DistributionName
查找 het 键DistributionName
更改该值即可
注意更改名称会引起报错:
WslRegisterDistribution failed with error: 0x80070050
解决办法,把名称改回去,额。。。:
Please backup (using the steps I mention in my previous answer) before trying this.
wsl --shutdown (from PowerShell or CMD)
In Windows, run the Registry Editor
Find \HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss
Find the key in there that has DistributionName of Ubuntu20.04LTS. Change the Ubuntu20.04LTS to Ubuntu-20.04.
In theory, that may fix the problem by changing the distribution name back to what it should be.
执行验证:wsl -l -v
Windows Terminal
您可以从Microsoft Store安装Windows Terminal:https://aka.ms/terminal
官方文档:https://docs.microsoft.com/en-us/windows/terminal/
快速打开:运行 wt
快速启动ssh:wt -w 0 new-tab cmd /k ssh root@172.16.2.223
设置-打开JSON文件 settings.json
// This file was initially generated by Windows Terminal Preview 1.5.3242.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}",
// You can add more global application settings here.
// To learn more about global settings, visit https://aka.ms/terminal-global-settings
// If enabled, selections are automatically copied to your clipboard.
"copyOnSelect": false,
// If enabled, formatted data is also copied to your clipboard
"copyFormatting": false,
// A profile specifies a command to execute paired with information about how it should look and feel.
// Each one of them will appear in the 'New Tab' dropdown,
// and can be invoked from the commandline with `wt.exe -p xxx`
// To learn more about profiles, visit https://aka.ms/terminal-profile-settings
"profiles":
{
"defaults":
{
// Put settings here that you want to apply to all profiles.
},
"list":
[
{
"commandline": "wsl -d Ubuntu-20.04 -u root ssh m1",
"cursorShape": "filledBox",
"font":
{
"size": 13.0
},
"guid": "{51b9d197-e6b9-4591-a28a-5593e4ddf68f}",
"hidden": false,
"icon": "https://assets.ubuntu.com/v1/49a1a858-favicon-32x32.png",
"name": "M1",
"tabTitle": "M4"
},
{
"antialiasingMode": "grayscale",
"bellStyle": "none",
"commandline": "ssh root@m6",
"font":
{
"size": 13.0
},
"guid": "{fea42d9f-022a-4ecc-be2d-2964d0d1671c}",
"hidden": false,
"historySize": 9001,
"icon": "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png",
"name": "m6",
"startingDirectory": "~"
},
{
"commandline": "C:\\WINDOWS\\system32\\wsl.exe -d Ubuntu-20.04",
"guid": "{4dd1e689-b517-5f39-947d-78e8a8bdf958}",
"hidden": false,
"name": "m4",
"source": "CanonicalGroupLimited.Ubuntu20.04LTS_79rhkp1fndgsc",
"startingDirectory": "/app"
}
]
},
// Add custom color schemes to this array.
// To learn more about color schemes, visit https://aka.ms/terminal-color-schemes
"schemes": [],
// Add custom actions and keybindings to this array.
// To unbind a key combination from your defaults.json, set the command to "unbound".
// To learn more about actions and keybindings, visit https://aka.ms/terminal-keybindings
"actions":
[
// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
// These two lines additionally bind them to Ctrl+C and Ctrl+V.
// To learn more about selection, visit https://aka.ms/terminal-selection
{ "command": "closeTab", "keys": "ctrl+w" },
{ "command": "newTab", "keys": "ctrl+t" },
{ "command": "scrollUpPage", "keys": "alt+pageup" },
{ "command": "scrollUpPage", "keys": "shift+pageup" },
{ "command": "scrollDownPage", "keys": "alt+pagedown" },
{ "command": "scrollDownPage", "keys": "shift+pagedown" },
{ "command": { "action": "switchToTab", "index": 0 }, "keys": "ctrl+1" },
{ "command": { "action": "switchToTab", "index": 1 }, "keys": "ctrl+2" },
{ "command": { "action": "switchToTab", "index": 2 }, "keys": "ctrl+3" },
{ "command": { "action": "switchToTab", "index": 3 }, "keys": "ctrl+4" },
{ "command": { "action": "switchToTab", "index": 4 }, "keys": "ctrl+5" },
{ "command": { "action": "switchToTab", "index": 5 }, "keys": "ctrl+6" },
{ "command": { "action": "switchToTab", "index": 6 }, "keys": "ctrl+7" },
{ "command": { "action": "switchToTab", "index": 7 }, "keys": "ctrl+8" },
{ "command": { "action": "switchToTab", "index": 8 }, "keys": "ctrl+9" },
{ "command": { "action": "switchToTab", "index": 0 }, "keys": "alt+1" },
{ "command": { "action": "switchToTab", "index": 1 }, "keys": "alt+2" },
{ "command": { "action": "switchToTab", "index": 2 }, "keys": "alt+3" },
{ "command": { "action": "switchToTab", "index": 3 }, "keys": "alt+4" },
{ "command": { "action": "switchToTab", "index": 4 }, "keys": "alt+5" },
{ "command": { "action": "switchToTab", "index": 5 }, "keys": "alt+6" },
{ "command": { "action": "switchToTab", "index": 6 }, "keys": "alt+7" },
{ "command": { "action": "switchToTab", "index": 7 }, "keys": "alt+8" },
{ "command": { "action": "switchToTab", "index": 8 }, "keys": "alt+9" },
{ "command": {"action": "copy", "singleLine": false }, "keys": "ctrl+c" },
{ "command": "paste", "keys": "ctrl+v" },
// Press Ctrl+Shift+F to open the search box
{ "command": "find", "keys": "ctrl+shift+f" },
// Press Alt+Shift+D to open a new pane.
// - "split": "auto" makes this pane open in the direction that provides the most surface area.
// - "splitMode": "duplicate" makes the new pane use the focused pane's profile.
// To learn more about panes, visit https://aka.ms/terminal-panes
{ "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" }
]
}
Ubuntu源修改
Ubuntu 20.04 /etc/apt/sources.list
deb http://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse
直接写入法
echo -e "deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse\n\
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse\n\
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse\n\
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse" > /etc/apt/sources.list
替换法
sed -i -r 's#http://(archive|security).ubuntu.com#https://mirrors.aliyun.com#g' /etc/apt/sources.list
替换法2
替换中科大
sed -i -r 's#http://mirrors.aliyun.com#http://mirrors.ustc.edu.cn#g' /etc/apt/sources.list
替换163
sed -i -r 's#http://mirrors.aliyun.com#http://mirrors.163.com#g' /etc/apt/sources.list
替换清华
sed -i -r 's#http://mirrors.aliyun.com#http://mirrors.tuna.tsinghua.edu.cn#g' /etc/apt/sources.list
Windows SVN
https://tortoisesvn.net/downloads.zh.html
Windows GIT
PC控制显示Android设备 投屏显示
QtScropy支持通过USB或网络显示和控制Android设备。它不需要root权限。
项目地址:https://github.com/barry-ran/QtScrcpy
Windows Android子系统
安装过程:https://pureinfotech.com/install-windows-subsystem-android-wsa-windows-11/
接口调试工具
postman
https://www.postman.com/downloads/
PostmanCanary
https://www.postman.com/downloads/canary/
insomnia
https://insomnia.rest/download/
ApiPost
https://www.apipost.cn/download.html
eolink
apifox
SSH连接客户端
MobaXterm
https://mobaxterm.mobatek.net/
XSHELL
https://www.xshell.com/zh/xshell/
Git bash
https://git-scm.com/download/win
配置
默认打开路径
修改文件:C:\Program Files\PortableGit\etc\profile
在底部加入
# set Project Path proj=”你的项目文件目录” cd $proj
加入Alias
进入 C:\Users\username目录
添加3个文件(.bash_profile,.bashrc,git-prompt.sh):
.bash_profile
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
.bashrc
alias s='screen -d -R'
alias mp='git commit -am "autopush" && git push'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias ls='ls -hFG'
alias l='ls -lFah'
alias ll='ls -alF'
alias lt='ls -ltrF'
alias ll='ls -alF'
alias lls='ls -alSrF'
alias llt='ls -altrF'
alias tarc='tar cvf'
alias tarcz='tar czvf'
alias tarx='tar xvf'
alias tarxz='tar xvzf'
alias g='git'
alias less='less -R'
alias os='lsb_release -a'
alias vi='vim'
# Colorize directory listing
alias ls="ls -ph --color=auto"
# Colorize grep
alias grep="grep --color=auto"
# Shell
export CLICOLOR="1"
if [ -f "$HOME/git-prompt.sh" ]; then
source $HOME/git-prompt.sh
export GIT_PS1_SHOWDIRTYSTATE="1"
export PS1="\[\033[40m\]\[\033[34m\][ \[\033[36m\]\w\$(__git_ps1 \" \[\033[35m\]{\[\033[32m\]%s\[\033[35m\]}\")\[\033[34m\] ]$\[\033[0m\] "
# export PS1="\[\033[40m\]\[\033[34m\][ \u@\H:\[\033[36m\]\w\$(__git_ps1 \" \[\033[35m\]{\[\033[32m\]%s\[\033[35m\]}\")\[\033[34m\] ]$\[\033[0m\] "
else
export PS1="\[\033[40m\]\[\033[34m\][ \[\033[36m\]\w\[\033[34m\] ]$\[\033[0m\] "
# export PS1="\[\033[40m\]\[\033[34m\][ \u@\H:\[\033[36m\]\w\[\033[34m\] ]$\[\033[0m\] "
fi
export LS_COLORS="di=34:ln=35:so=32:pi=33:ex=1;40:bd=34;40:cd=34;40:su=0;40:sg=0;40:tw=0;40:ow=0;40:"
执行bat
git-bash下执行RUN.bat
cmd /cRUN.bat
编辑器
Markdown编辑器
Typora
Typora Beta 0.11.18 下载地址:
- Windows x64: https://download.typora.io/windows/typora-update-x64-1117.exe
- Windows x86: https://download.typora.io/windows/typora-update-ia32-1117.exe
- Linux x64: https://download.typora.io/linux/typora_0.11.18_amd64.deb
- MacOS: https://download.typora.io/mac/Typora-0.11.18.dmg
markdownpad
Email:
Soar360@live.com
License Key:
GBPduHjWfJU1mZqcPM3BikjYKF6xKhlKIys3i1MU2eJHqWGImDHzWdD6xhMNLGVpbP2M5SN6bnxn2kSE8qHqNY5QaaRxmO3YSMHxlv2EYpjdwLcPwfeTG7kUdnhKE0vVy4RidP6Y2wZ0q74f47fzsZo45JE2hfQBFi2O9Jldjp1mW8HUpTtLA2a5/sQytXJUQl/QKO0jUQY4pa5CCx20sV1ClOTZtAGngSOJtIOFXK599sBr5aIEFyH0K7H4BoNMiiDMnxt1rD8Vb/ikJdhGMMQr0R4B+L3nWU97eaVPTRKfWGDE8/eAgKzpGwrQQoDh+nzX1xoVQ8NAuH+s4UcSeQ==
VScode
下载:https://code.visualstudio.com/Download
同步配置
文件 - 首选项 - 设置同步 (可使用live账户)
VScode 启动终端时conda报错
1.把默认*.ps1启动脚本删除
如果启动PowerShell时出现错误无法加载文件 **.ps1,因为在此系统中禁止执行脚本。
需要打开目录:
%UserProfile%\Documents\WindowsPowerShell
把里面的脚本删除。
或者执行命令:set-ExecutionPolicy RemoteSigned
是否要更改执行策略? 选择是
2.清除vscode的默认python解释器设置
按下快捷键:Ctrl + Shift + P
输入:clear workspace interpreter setting
插件
终端下使用的字体(等宽字体)
https://github.com/abertsch/Menlo-for-Powerline
右键使用vscode打开.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\VSCode]
@="VSCode"
"Icon"="C:\\Users\\ml\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\*\shell\VSCode\command]
@="\"C:\\Users\\ml\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%1\""
旧版:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\VSCode]
@="VSCode"
"Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\*\shell\VSCode\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%1\""
EmEditor
超大文件编辑器
https://www.rjsos.com/archives/emurasoft19.html
浏览器
Chrome
Chrome:
注意下载地址长期不变,但下到的始终是当前最新的Stable版。
32位:直接下载
64位:直接下载
Chrome Canary:
Chrome Dev:
Chrome Beat:
Chrome Stable for Linux
64位
https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
chrome代理插件:https://github.com/FelisCatus/SwitchyOmega/releases
Chrome 启动参数
模拟edge的useragent,并直接打开bingAI
“C:\Program Files (x86)\Google\Chrome\Application\chrome.exe” –User-Agent=”Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1788.0 uacq” https://www.bing.com/chat
“C:\Users\malu\AppData\Local\Google\Chrome SxS\Application\chrome.exe” –User-Agent=”Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1788.0 uacq” https://www.bing.com/chat
FireFox
下载地址:
https://www.mozilla.org/en-US/firefox/all/
Opera
Opera浏览器桌面版历史版本下载
http://get.opera.com/ftp/pub/opera/desktop/
http://get.geo.opera.com/pub/opera/desktop/
Windows 11启动IE浏览器
创建 ie.vbs
CreateObject("InternetExplorer.Application").Visible=true
注意win10下只需运行:
iexplore
Vmware
Vmware Workstation Pro 下载 15-14
https://my.vmware.com/group/vmware/info?slug=desktop_end_user_computing/vmware_workstation_pro/15_0
激活许可证
UY758-0RXEQ-M81WP-8ZM7Z-Y3HDA
VF750-4MX5Q-488DQ-9WZE9-ZY2D6
UU54R-FVD91-488PP-7NNGC-ZFAX6
YC74H-FGF92-081VZ-R5QNG-P6RY4
YC34H-6WWDK-085MQ-JYPNX-NZRA2
Vmware Workstation Pro 历史版本下载 12-9
https://my.vmware.com/group/vmware/info/slug/desktop_end_user_computing/vmware_workstation_pro/12_0
清理VMware.bat
net stop VMwareHostd
net stop VMAuthdService
net stop VMnetDHCP
net stop VMUSBArbService
net stop "VMware NAT Service"
taskkill /F /im vmware-tray.exe
远程桌面
向日葵
https://sunlogin.oray.com/download/
ToDesk
https://www.todesk.com/download.html
raylink
RustDesk
VNC
TeamViewer
https://www.teamviewer.cn/cn/download/windows/
清理远程.bat
sc stop "SunloginService"
sc stop "ToDesk_Service"
sc stop "teamviewer"
sc stop "vncserver"
taskkill /F /im SunloginClient.exe
taskkill /F /im todesk_service.exe
taskkill /F /im todesk.exe
REM start "" "C:\Program Files\RealVNC\VNC Server\vncserver.exe" -service -stop
启动远程.bat
sc start "SunloginService"
sc start "ToDesk_Service"
sc start "teamviewer"
sc start "vncserver"
虚拟组网
蒲公英
下载地址: https://pgy.oray.com/download/
控制台: https://console.sdwan.oray.com/zh/sdwan/softwareMember
WSL2 Ubuntu下快速安装
wget https://pgy.oray.com/softwares/153/download/2156/PgyVisitor_6.2.0_x86_64.deb
dpkg -i PgyVisitor_6.2.0_x86_64.deb
pgyvisitor login
# 可能会遇到:The system is busy, please try again later
# 那么直接启动
pgyvpn_svr --sn 4318111:003 --pwd password -d
# 自动登录
pgyvisitor autologin -y
安装old:
apt install -y lsb-core
wget https://pgy.oray.com/softwares/42/download/1838/PgyVisitor_Ubuntu_2.4.0.52291_x86_64.deb
dpkg -i PgyVisitor_Ubuntu_2.4.0.52291_x86_64.deb
pgyvpn_svr --sn 4318111:003 --pwd password -d
卸载old:
dpkg -l |grep pgy
dpkg -r pgyvpn
企业版(已隐藏 推荐用PgyVisitor版本 https://service.oray.com/question/15511.html):
wget https://pgy.oray.com/softwares/153/download/1819/PgyEnterprise_Ubuntu_1.2.0.52122_x86_64.deb
dpkg -i PgyEnterprise_Ubuntu_1.2.0.52122_x86_64.deb
pgyenterprise login
pgyenterprise autologin -y
pgyenterprise getmbrs -m # 显示成员网络
自定义路由
M1:
route add 192.168.1.0/24 192.168.50.2
route add 192.168.1.45/32 192.168.2.1
route add 192.168.1.46/32 192.168.2.1
m1:
ip r add 192.168.1.0/24 via 172.16.1.185 # 指向m12
sudo iptables -F
sudo iptables -X
sudo iptables -P INPUT ACCEPT
sudo iptables -P OUTPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
m12:
ip r add 192.168.50.0/24 via 172.16.2.110
echo 1 > /proc/sys/net/ipv4/ip_forward
m8:
ip r add 192.168.50.0/24 via 192.168.1.12
zerotier
下载地址 https://zerotier.com/download/
私有根服务(原名moon):https://docs.zerotier.com/roots/
安装Windows
https://download.zerotier.com/dist/ZeroTier%20One.msi
安装Linux
curl -s https://install.zerotier.com | sudo bash
命令参考:
升级
apt upgrade zerotier-one
启动服务
service zerotier-one start
加入网络(用管理员权限)
zerotier-cli join <Network ID>
加入moon(用管理员权限)
zerotier-cli orbit <Moon ID> <Moon ID>
重启moon
systemctl restart zerotier-one
service zerotier-one restart
离开moon(用管理员权限)
zerotier-cli deorbit <Moon ID>
列出 zerotier 的 peer 列表
zerotier-cli listpeers
列出 zerotier 的 moon 列表
zerotier-cli listmoons
# 启动
zerotier-one -d
# 获取地址和服务状态
zerotier-cli status
# 加入、离开、列出网络
zerotier-cli join <Network ID>
zerotier-cli leave <Network ID>
zerotier-cli listnetworks
# 重启
service zerotier-one restart
systemctl restart zerotier-one
# 查看本机ZeroTier address ID
zerotier-cli info
zerotier moon搭建
1.依次输入
cd /var/lib/zerotier-one
sudo zerotier-idtool initmoon identity.public > moon.json
2.接着输入vim moon.json编辑文件
这里我们需要根据自己服务器的公网静态IP,修改stableEndpoints那一行格式如下,其中11.22.33.44为你的公网IP(可以是DMZ的公网IP),9993是默认的端口号:
"stableEndpoints": [ "11.22.33.44/9993" ]
3.根据moon.json文件生成真正需要的签名文件*.moon:
zerotier-idtool genmoon moon.json
执行该命令以后会在软件目录下生成一个类似000000xxxxxxxxx.moon的文件
4.让配置生效
移动.moon签名文件到moons.d目录下并且重启服务,注意替换自己的moon文件名字:
cd /var/lib/zerotier-one && mkdir moons.d && mv 000000*.moon moons.d && service zerotier-one restart
主机需要公网开放9993端口,测试是否开放:
telnet localhost 9993
nmap localhost -p 9993
报错:Cannot connect to Zerotier service
查看9993端口是否被占用
netstat -ab
windows主机与子系统WSL2中同时执行zerotier导致无法加载网卡
原因:
WSL2子系统内启动zerotier会默认在附属主机上创建 127.0.0.1:9993 的监听,导致 windows主机上的zerotier启动时端口被占用冲突。
解决办法:
修改WSL2子系统上的默认端口:
Windows: C:\ProgramData\ZeroTier\One\local.conf
Macintosh: /Library/Application Support/ZeroTier/One/local.conf
Linux: /var/lib/zerotier-one/local.conf
FreeBSD/OpenBSD: /var/db/zerotier-one/local.conf
zerotier local.conf文件的内容应该是一个JSON格式的对象,包含一个settings键和一个值。例如:
{
"settings": {
"primaryPort": "9994"
}
}
WSL2中重启zerotier:
service zerotier-one restart
tailscale
https://login.tailscale.com/admin/welcome
headscale
https://github.com/juanfont/headscale/
serveo
官网:https://serveo.net
eg:
ssh -R testname:80:localhost:80 serveo.net -o ServerAliveInterval=60
文档:https://www.jianshu.com/p/d0b3991a9ce1
Win10启动时候加载bat
运行: shell:startup -> startup.vbs
set ws=WScript.CreateObject("WScript.Shell")
ws.Run "C:\auto_run\startup\start.bat /start",0
Beyond Compare
http://www.ucbug.com/soft/40421.html
安装说明:https://www.rjsos.com/archives/beyondcompare4.html
Adobe All
https://w14.monkrus.ws/
Adobe Photoshop CS6
http://xiazai.zol.com.cn/detail/15/146785.shtml
补丁 (将 amtlib 覆盖掉相应软件的源文件) http://xiazai.zol.com.cn/detail/45/440347.shtml
Adobe Premiere Pro 2020
https://www.rjsos.com/archives/premiere2020.html
Everything
Windows桌面搜索引擎 (快速搜索文件工具)
思维导图
XMind
https://www.xmind.cn/download/ 破解1 破解2
MindMaster
https://www.edrawsoft.cn/mindmaster/ 破解
Virtual Audio Cable
混音软件,可实现多音频设备同时输出
https://software.muzychenko.net/eng/vacselect.htm
翻译
https://appdownload.deepl.com/windows/full/DeepLSetup.exe
Hyper
安装主题
hyper i hyper-material-theme
配置文件路径:C:\Users\malu\AppData\Roaming\Hyper.hyper.js
shell: ‘C:\Program Files\PortableGit\bin\bash.exe’, … plugins: [“hyper-material-theme”],
SQL
MySQL
Navicat Premium 16 无限试用: n.bat
@echo off
echo Delete HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium\Registration[version and language]
for /f %%i in ('"REG QUERY "HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium" /s | findstr /L Registration"') do (
reg delete %%i /va /f
)
echo.
echo Delete Info folder under HKEY_CURRENT_USER\Software\Classes\CLSID
for /f %%i in ('"REG QUERY "HKEY_CURRENT_USER\Software\Classes\CLSID" /s | findstr /E Info"') do (
reg delete %%i /va /f
)
echo.
echo Finish
pause
Dbeaver 全能客户端 https://dbeaver.io/
MongoDB
MongoDB Compass 客户端下载: https://www.mongodb.com/try/download/compass
Redis
Windows Redis
https://github.com/microsoftarchive/redis/releases
Redis GUI客户端
https://redis.com/redis-enterprise/redis-insight
微软应用商店下载(最新版): https://apps.microsoft.com/store/detail/redisinsight/XP8K1GHCB0F1R2
直接下载:https://download.redisinsight.redis.com/latest/RedisInsight-v2-win-installer.exe
其他
PowerDesigner v16.5
http://onlinedown.rbread04.cn/huajunsafe/powerdesigner1029.zip
ODBC for MySQL
(注意powerdesigner是用java32位的,所以ODBC也下32位
https://dev.mysql.com/downloads/connector/odbc/
BIOS
bios修改工具mmtool https://softradar.com/static/products/mmtool/distr/0/mmtool_softradar-com.zip
win10适配修改器 http://www.angusj.com/resourcehacker
也可以直接下修改好的mmtool http://www.smxdiy.com/thread-1995-1-1.html
技嘉B85主板BIOS https://www.gigabyte.com/tw/Motherboard/GA-B85-HD3-A-rev-10/support#support-dl-bios
B85芯片组主板也能用上NvmeSSD https://zhuanlan.zhihu.com/p/40367807
Disk
磁盘性能测试
CrystalDiskMark:https://crystalmark.info/en/download/