Skip to content

个人常用脚本及指令备份

更新: 3/5/2025 字数: 623 字 时长: 3 分钟

一些常用的 Shell 脚本。

docker 搭建 socks5

bash
# 指定密码(建议)
docker run -d --name socks5 -p 10808:1080 -e PROXY_USER=用户名 -e PROXY_PASSWORD=密码 --restart=always serjs/go-socks5-proxy
# 不指定密码
docker run -d --name socks5 -p 10808:1080 --restart=always serjs/go-socks5-proxy
bash
10808:1080 #把 docker 的 1080 端口映射到 VPS 的 10808 端口
PROXY_USER #用户连接的用户名,不指定默认为无认证
PROXY_PASSWORD #用户连接的密码,不指定默认为无密码

自定义测速脚本

用于对国外 vps 配置以及网络测试

bash
bash <(curl -Lso- https://git.io/superbench)

一键 DD 网络重装脚本

bash
wget --no-check-certificate -O AutoReinstall.sh https://git.io/AutoReinstall.sh && bash AutoReinstall.sh

CentOS:Pwd@CentOS

其他 Linux 系统:Pwd@Linux

系统DD包下载:https://dd.1234234.xyz/

Debian/Ubuntu 开启 BBR

bash
# 修改系统变量
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf

# 保存生效
sysctl -p

# 查看内核是否已开启BBR
lsmod | grep bbr

# 显示如下,即成功
tcp_bbr                20480  2

bbr/bbrplus/锐速内核安装脚本

bash
# 卸载内核
wget -N --no-check-certificate "https://github.000060000.xyz/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
# 或
wget -O tcp.sh "https://git.io/coolspeeda" && chmod +x tcp.sh && ./tcp.sh

# 不卸载内核
wget -N --no-check-certificate "https://github.000060000.xyz/tcpx.sh" && chmod +x tcpx.sh && ./tcpx.sh
# 或
wget -O tcpx.sh "https://git.io/JYxKU" && chmod +x tcpx.sh && ./tcpx.sh

服务器状态监控

bash
# 海外
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh  -o nezha.sh && chmod +x nezha.sh
./nezha.sh

# 大陆
curl -L https://cdn.jsdelivr.net/gh/naiba/nezha@master/script/install.sh -o nezha.sh && chmod +x nezha.sh
CN=true ./nezha.sh

Screen

bash
# 新建 i 窗口
screen -S i

# 查看所有窗口
screen -ls

# 接入 i 窗口
screen -r i

# 关闭 i 窗口
screen -X -S i quit

# 结束已死进程
screen -wipe

Git

bash
# 配置用户名邮箱
git config --global user.name “wkwbk”
git config --global user.email “XXXXXX@qq.com”

# 克隆远程仓库
git clone https://github.com/wkwbk/wkwbk.github.io.git

# 添加当前目录文件
git add .

# 提交说明
git commit -m 'lisir.me'

# 更新到仓库
git push origin main

Dism++ 清理 WinSxS 出错

powershell
# 分析命令
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore

# 清理命令
Dism.exe /Online /Cleanup-Image /StartComponentCleanup

Office Tool Plus

bash
# Mondo 2016 激活
ospp /inslicid MondoVolume /sethst:kms.loli.best /setprt:1688 /act

贡献者

The avatar of contributor named as wkwbk wkwbk

页面历史

布局切换

调整 VitePress 的布局样式,以适配不同的阅读习惯和屏幕环境。

全部展开
使侧边栏和内容区域占据整个屏幕的全部宽度。
全部展开,但侧边栏宽度可调
侧边栏宽度可调,但内容区域宽度不变,调整后的侧边栏将可以占据整个屏幕的最大宽度。
全部展开,且侧边栏和内容区域宽度均可调
侧边栏宽度可调,但内容区域宽度不变,调整后的侧边栏将可以占据整个屏幕的最大宽度。
原始宽度
原始的 VitePress 默认布局宽度

页面最大宽度

调整 VitePress 布局中页面的宽度,以适配不同的阅读习惯和屏幕环境。

调整页面最大宽度
一个可调整的滑块,用于选择和自定义页面最大宽度。

内容最大宽度

调整 VitePress 布局中内容区域的宽度,以适配不同的阅读习惯和屏幕环境。

调整内容最大宽度
一个可调整的滑块,用于选择和自定义内容最大宽度。

聚光灯

支持在正文中高亮当前鼠标悬停的行和元素,以优化阅读和专注困难的用户的阅读体验。

ON开启
开启聚光灯。
OFF关闭
关闭聚光灯。

聚光灯样式

调整聚光灯的样式。

置于底部
在当前鼠标悬停的元素下方添加一个纯色背景以突出显示当前鼠标悬停的位置。
置于侧边
在当前鼠标悬停的元素旁边添加一条固定的纯色线以突出显示当前鼠标悬停的位置。