指令或脚本

已保存的指令或脚本

内地封闭国外香港机器安装komari

#修改版本-默认从本地加载komari-agent-linux-amd64 ,文件必须缓存到国内的服务器上 wget http://103.236.68.37:28080/directlink/1/%E5%AE%A2%E4%BA%BA/komari-monitor-install.sh #可以从Github获取最新,文件必须缓存到国内的服务器上 wget http://103.236.68.37:28080/directlink/1/%E5%AE%A2%E4%BA%BA/komari-agent-linux-amd64 #示例 bash komari-monitor-install.sh -e http://110.42.59.226:60123 -t ddSWBZ48UziHTI2222222222 --disable-auto-update --ignore-unsafe-cert #自启动示例(一般可以跳过) crontab -e @reboot /opt/komari/agent -e http://110.42.59.226:60123 -t sA8Zz2yztxDaDXJbfXWOgr --disable-auto-update --ignore-unsafe-cert &

2026-01-30 00:23:07

核云的VNC使用不显示画面,看起来异常

在 Edge 地址栏输入 edge://settings/content/insecureContent 并回车 在 “允许显示不安全的内容”右边点“添加站点”。 把核云的域名添加进去: [*.]heyunidc.cn 点击 “添加” 保存。 刷新相关页面生效。 原理就是,核云的VNC使用IP连接的,没有证书,而浏览器默认会拒绝HTTPS下的网页发送不安全的连接(比如http或者ws),刚刚的操作就是把核云添加例外

2026-01-29 06:13:04

激活Windows

irm https://get.activated.win | iex

2026-01-27 07:07:21

在 1Panel 中停止服务并取消开机自启动

# 停止1panel前台管理页面 1pctl stop core # 查看状态 1pctl status # 或者分别查看 systemctl status 1panel-core.service systemctl status 1panel-agent.service # 禁用自启动 systemctl disable 1panel-core.service systemctl disable 1panel-agent.service # 启动所有服务 1pctl start all # 启用自启动(如果需要的话) systemctl enable 1panel-core.service systemctl enable 1panel-agent.service

2026-01-27 05:57:03

测速脚本简单代理下载文件

代理 bash <(curl -sL https://nav.mblue.ltd/my/download/v3/index.php?url=https://run.NodeQuality.com) 默认 bash <(curl -sL https://run.NodeQuality.com)

2026-01-18 11:05:25

图标生成

方形脚本图标,中央偏上位置用简洁的手写字体写着“脚本”二字,字体为黑色,线条干净利落。图标背景为纯色浅米黄,边缘有细微的阴影效果增加立体感。整体设计简约现代,图标四角略微圆润以增强柔和感。风格是极简扁平风,比例是1:1。

2026-01-18 01:24:12

解决ubuntu24.04.3腾讯云IPV6默认问题(或许临时)

ip -6 addr show dev eth0 ubuntu@VM-0-6-ubuntu:~$ sudo rdisc6 eth0 Soliciting ff02::2 (ff02::2) on eth0... Hop limit : undefined ( 0x00) Stateful address conf. : Yes Stateful other conf. : No Mobile home agent : No Router preference : medium Neighbor discovery proxy : No Router lifetime : 0 (0x00000000) seconds Reachable time : unspecified (0x00000000) Retransmit time : unspecified (0x00000000) MTU : 1464 bytes (valid) Prefix : 2402:4e00:1802:225e::/64 On-link : Yes Autonomous address conf.: No Valid time : infinite (0xffffffff) Pref. time : infinite (0xffffffff) from fe80::fcee:bfff:fef1:aaf1 sudo ip -6 route add default via fe80::fcee:bfff:fef1:aaf1 dev eth0 mtu 1464

2026-01-16 08:27:11

获取IPV6隧道支持IPV6访问

获取和设置步骤(以Windows 10/11为例) 这是最直接的方法,在单台电脑上设置。 第1步:注册HE账户并创建隧道 访问HE Tunnel Broker: 打开浏览器,访问 https://tunnelbroker.net/ 注册账户: 点击页面上的 "Register" 按钮,填写用户名、密码、邮箱等信息完成注册。 登录并创建隧道: 注册成功后登录。 点击左侧菜单的 "User Functions" -> "Create Regular Tunnel"。 在 "IPv4 Endpoint" 一栏,填入你当前的公网IPv4地址(就是你之前测试的 147.189.169.177)。 在 "Available Tunnel Servers" 列表里,选择一个延迟较低的服务器。通常选择地理位置离你较近的。例如,如果你在中国,可以选择香港、日本、新加坡或美国的西海岸节点。 点击 "Create Tunnel" 按钮。 记录重要信息: 创建成功后,你会看到一个配置页面,请务必记下以下关键信息,下一步会用到: Server IPv4 Address: 隧道服务器的IPv4地址(例如:216.218.221.6) Client IPv6 Address: 分配给你的IPv6地址(例如:2001:470:xxxx:xxxx::2/64) Routed /64: 分配给你的IPv6子网(例如:2001:470:xxxx:xxxx::/64) 页面底部有针对不同操作系统的配置命令,我们接下来会用到。 第2步:在Windows中配置隧道 打开命令提示符(以管理员身份): 按 Win + S,搜索 "cmd"。 右键点击 "命令提示符",选择 "以管理员身份运行"。 执行配置命令: 回到HE隧道的配置页面,找到 "Windows Command Line" 部分,你会看到类似下面的命令。请逐行复制并执行这些命令。 # 1. 创建一个名为 "he-ipv6" 的隧道接口 netsh interface teredo set state disabled netsh interface ipv6 add v6v4tunnel interface=he-ipv6 localaddress=你的本地IPv4地址 remoteaddress=隧道服务器IPv4地址 # 2. 为隧道接口配置IPv6地址 netsh interface ipv6 add address interface=he-ipv6 address=你的Client IPv6地址 # 3. 为隧道接口添加默认网关(指向隧道服务器) netsh interface ipv6 add route prefix=::/0 interface=he-ipv6 nexthop=隧道服务器的IPv6地址 请注意替换: 你的本地IPv4地址: 就是你电脑当前的局域网IP(通常是192.168.x.x),可以在CMD里输入 ipconfig查看 "IPv4 Address"。 隧道服务器IPv4地址: 就是你在HE页面记录的 "Server IPv4 Address"。 你的Client IPv6地址: 就是你在HE页面记录的 "Client IPv6 Address"(去掉最后的 /64)。 隧道服务器的IPv6地址: 通常是你的 "Client IPv6 Address" 最后一位从 ::2改成 ::1。 示例(请替换为你的真实信息): netsh interface ipv6 add v6v4tunnel interface=he-ipv6 localaddress=192.168.1.100 remoteaddress=216.218.221.6 netsh interface ipv6 add address interface=he-ipv6 address=2001:470:abcd:1234::2 netsh interface ipv6 add route prefix=::/0 interface=he-ipv6 nexthop=2001:470:abcd:1234::1 验证配置: 在CMD中输入 ipconfig。你应该能看到一个名为 "he-ipv6" 的接口,并且已经获得了IPv6地址和默认网关。 访问 https://test-ipv6.com/进行测试。如果看到得分是 10/10,恭喜你,IPv6隧道已经成功!

2026-01-16 05:59:23

测速测性能Benchmark script for server

bash <(curl -sL https://run.NodeQuality.com)

2026-01-16 05:44:45

nslookup查看域名解析

nslookup ki.mblue.ltd C:\Users\tianshuaitao>nslookup ki.mblue.ltd 服务器: kent-server2.kent.com Address: 172.16.0.2 非权威应答: 名称: ki.mblue.ltd Address: 154.201.88.252

2026-01-16 02:09:02

iptables脚本封禁异常IP

系统已安装 iptables和 ipset 以 root 权限运行 本机已明确知道哪些端口是“开放”的(如 22, 80, 443 等) block_invalid_first_packet.sh #!/bin/bash # 定义要监控的链(这里用 INPUT 链) CHAIN="INPUT" # 定义本机开放的有效服务端口(根据实际情况修改) ALLOWED_PORTS="22,80,443" # 示例:SSH, HTTP, HTTPS # 定义 ipset 名称 IPSET_NAME="blocked_ips_temp" IPSET_TIMEOUT=3600 # 封禁时间(秒),1 小时 # 创建 ipset(如果不存在) if ! ipset list "$IPSET_NAME" &>/dev/null; then echo "Creating ipset: $IPSET_NAME with timeout $IPSET_TIMEOUT" ipset create "$IPSET_NAME" hash:ip timeout "$IPSET_TIMEOUT" fi # 添加 iptables 规则:对未建立连接且目标端口不在白名单的 SYN 包进行匹配 # 注意:只处理 TCP 新连接(SYN 包) iptables -I $CHAIN 1 -p tcp --syn \ -m set ! --match-set "$IPSET_NAME" src \ -m multiport ! --dports "$ALLOWED_PORTS" \ -j SET --add-set "$IPSET_NAME" src --exist # 可选:记录被拦截的包(用于调试或审计) iptables -I $CHAIN 2 -p tcp --syn \ -m set ! --match-set "$IPSET_NAME" src \ -m multiport ! --dports "$ALLOWED_PORTS" \ -j LOG --log-prefix "[BLOCK_FIRST_PACKET] " --log-level info echo "规则已加载:非白名单端口的首次 TCP 连接将被封禁 1 小时。" chmod +x /usr/local/bin/block_invalid_first_packet.sh sudo /usr/local/bin/block_invalid_first_packet.sh

2026-01-15 23:54:37

Linux一键安装简单的Nginx+Php

sudo apt install -y nginx php-fpm php-mysql php-cli php-curl php-gd php-sqlite3 php-pdo-sqlite sqlite3 php-mbstring php-xml php-zip php-intl php-bcmath php-json # 查看 PHP-FPM 版本(Debian 11 默认是 PHP 7.4) php -v # 输出类似 "PHP 7.4.33" # 编辑 Nginx 配置文件(以默认站点为例) sudo nano /etc/nginx/sites-available/default vim /etc/nginx/sites-available/default 取消注释,设置成这样 location ~ \.php$ { include snippets/fastcgi-php.conf; # PHP-FPM 监听地址(根据版本调整,7.4 对应 7.4) fastcgi_pass unix:/run/php/php7.4-fpm.sock; } # 检查 Nginx 配置是否有误 sudo nginx -t # 重启 Nginx 和 PHP-FPM sudo systemctl restart nginx php7.4-fpm # 设置开机自启 sudo systemctl enable nginx php7.4-fpm

2026-01-11 01:14:21

查询本机IP地址

浏览器 https://ipinfo.mblue.ltd/ https://ifconfig.me/ Linux命令行 curl ifconfig.me ⇒ 240a:42a3:3800:2640:f88d:c23b:4bfc:27a8 curl ifconfig.me/all.json ⇒ {"ip_addr":"240a:42a3:3800:2640:f88d:c23b:4bfc:27a8","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36 Edg/143.0.0.0","port":"58286","method":"GET","encoding":"gzip, deflate, br, zstd","mime":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7","via":"1.1 google","forwarded":"240a:42a3:3800:2640:f88d:c23b:4bfc:27a8,2600:1901:0:b2bd::","language":"zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"}

2026-01-08 01:28:29

测试回程

curl https://raw.githubusercontent.com/zhanghanyun/backtrace/main/install.sh -sSf | sh

2026-01-07 19:52:56

三网回程路由

bash <(curl -sL Net.Check.Place)

2026-01-07 19:23:46

开启BBR

curl -L https://raw.githubusercontent.com/vpsad/LinuxTool/main/Linux.sh -o Linux.sh && chmod +x Linux.sh && bash Linux.sh bbr 6-1-4

2026-01-07 19:19:04

内存管理Windows

EmptyStandbyList.exe workingsets

2026-01-07 09:09:26

查看哪个服务占内存Windows

tasklist /svc /fi "imagename eq svchost.exe"

2026-01-07 08:55:11

查看哪个进程占内存最多Windows

列出内存占用高的进程 tasklist /fo table | sort /r /+58 这会列出所有内存使用超过 10MB 的进程。 tasklist /fi "memusage gt 10000"

2026-01-07 08:54:45

HTML引用快速

https://gcore.jsdelivr.net/npm/jquery@3/dist/jquery.min.js https://unpkg.com/jquery@3.7.1/dist/jquery.min.js https://fastly.jsdelivr.net/npm/jquery@3/dist/jquery.min.js

2025-12-26 09:53:17

debian-9-sources.list

deb http://mirrors.aliyun.com/debian-archive/debian stretch main contrib non-free deb http://mirrors.aliyun.com/debian-archive/debian-security stretch/updates main contrib non-free

2025-12-25 06:15:30

一键测速脚本

国内测速脚本 curl -sL nws.sh | bash -s -- -r china 亚洲测速脚本 curl -sL nws.sh | bash -s -- -r asia 位置名称 region_name = na, sa, eu, asia, africa, au, middle-east, india, china, iran, indonesia, russia, 10gplus 带宽测速使用方法 curl -sL nws.sh | bash -s -- -r region_name wget -qO- nws.sh | bash -s -- -r region_name 稳定性使用方法 curl -sL nws.sh | bash -s -- -rt region_name wget -qO- nws.sh | bash -s -- -rt region_name North America = na South America = sa Europe = eu Asia ... Africa ... Australia ... GCC Middle East ... India ... China ... Iran ... Indonesia ... Russia ...

2025-12-24 07:23:09

Linux查询端口占用

sudo lsof -i :80 sudo ss -tulpn | grep :80

2025-12-24 02:38:23

Ubuntu禁止内核自动升级

# 锁定当前内核的核心包(替换成你自己的内核版本号) sudo apt-mark hold linux-image-$(uname -r) sudo apt-mark hold linux-headers-$(uname -r) sudo apt-mark hold linux-modules-$(uname -r) sudo apt-mark hold linux-modules-extra-$(uname -r) # 若有的话(部分内核版本有这个包) # 若之后想恢复内核自动更新 sudo apt-mark unhold linux-image-$(uname -r) linux-headers-$(uname -r) ... # 对应之前锁定的包

2025-12-24 00:48:40

Ubuntu禁止无人值守自动更新

# 停止当前运行的自动更新服务(若正在执行) sudo systemctl stop unattended-upgrades.service # 禁用服务(禁止开机自启,也不会后台触发) sudo systemctl disable unattended-upgrades.service # 可选:屏蔽服务(防止被其他程序意外启动) sudo systemctl mask unattended-upgrades.service # 修改APT自动更新配置文件 sudo nano /etc/apt/apt.conf.d/20auto-upgrades # 将文件内容修改为全部设为0 APT::Periodic::Update-Package-Lists "0"; # 不自动更新包列表 APT::Periodic::Download-Upgradeable-Packages "0"; # 不自动下载可更新包 APT::Periodic::AutocleanInterval "0"; # 不自动清理旧包 APT::Periodic::Unattended-Upgrade "0"; # 不自动安装更新

2025-12-24 00:43:55

Neofetch是一个命令行工具,用于在终端中显示系统信息

sudo apt install --no-install-recommends neofetch neofetch

2025-12-23 08:23:32

Linux清空apt缓存

# 你的原命令,查看APT缓存总大小 du -sh /var/cache/apt # 细分查看(包文件/索引文件) du -sh /var/cache/apt/archives # 已下载的.deb包 du -sh /var/cache/apt/pkgcache.bin # 包缓存索引 # 方法1:删除过期的APT缓存(保留近期有用的,推荐) sudo apt autoclean # 方法2:删除所有下载的.deb包(彻底清理,不影响已安装软件) sudo apt clean # 方法3:手动删除archives目录下的.deb包(不推荐,建议用apt命令) sudo rm -rf /var/cache/apt/archives/*.deb

2025-12-23 06:41:32

Linux判断是否有网络

ping -c 1 -W 2 1.1.1.1 ping -c 1 -W 2 1.1.1.1 &>/dev/null 无返回值

2025-12-23 04:29:21

续签证书

/www/server/panel/pyenv/bin/python3 -u /www/server/panel/class/acme_v2.py --renew_v2=1

2025-12-22 07:26:06

rsync同步两个文件夹的内容

rsync同步两个文件夹的内容 sudo apt-get install rsync # 对于 Debian/Ubuntu 系统 sudo yum install rsync # 对于 CentOS/RHEL 系统

2025-12-22 04:54:21

Swap脚本

wget https://www.moerats.com/usr/shell/swap.sh && bash swap.sh

2025-12-17 03:23:42

docker加速

阿里云(杭州) https://registry.cn-hangzhou.aliyuncs.com/ 阿里云(深圳) https://registry.cn-shenzhen.aliyuncs.com/ 阿里云(广州) https://registry.cn-guangzhou.aliyuncs.com/ 阿里云(成都) https://registry.cn-chengdu.aliyuncs.com/ 上海交通大学 https://docker.mirrors.sjtug.sjtu.edu.cn 南京大学 https://docker.nju.edu.cn

2025-12-08 05:58:09

webtop美观配置

docker run -d \ --name=webtop-ubuntu \ -e PUID=1000 \ -e PGID=1000 \ -e TZ=Asia/Shanghai \ -e LC_ALL=zh_CN.UTF-8 \ -e CUSTOM_USER=onno \ -e PASSWORD=Howtomakemoney1. \ -p 3000:3000 \ -p 3001:3001 \ -p 8082:8082 \ -p 33560-33570:33560-33570 \ -v /opt/1panel/apps/webtop/ubuntu/config:/config \ --shm-size="1gb" \ --restart unless-stopped \ lscr.io/linuxserver/webtop:ubuntu-kde

2025-12-05 03:41:00

docker加速

https://docker.1panel.live https://hub.rat.dev https://docker.actima.top https://docker.m.daocloud.io https://docker.1ms.run https://docker.aityp.com https://dockerhub.xisoul.cn https://hub.littlediary.cn

2025-12-05 03:09:23

webtop默认配置

docker run -d \ --name=webtop \ -e PUID=1000 \ -e PGID=1000 \ -e TZ=Etc/UTC \ -p 3000:3000 \ -p 3001:3001 \ -v /path/to/data:/config \ --shm-size="1gb" \ --restart unless-stopped \ lscr.io/linuxserver/webtop:latest

2025-12-05 02:41:02

Linux桌面

lscr.io/linuxserver/webtop 桌面 lscr.io/linuxserver/wps-office 文档 https://www.linuxserver.io/our-images

2025-12-05 02:22:20

安装简化图形界面

sudo apt install gnome-core

2025-12-04 06:32:45

安装图形界面

sudo apt-get install ubuntu-desktop sudo systemctl set-default graphical.target sudo apt-get install xrdp && sudo systemctl enable xrdp reboot

2025-12-04 06:29:45

一键更新源,Ubuntu和Debain

sudo apt update && sudo apt upgrade -y

2025-12-04 06:27:50

一键安装Linux简单桌面环境

sudo apt update && sudo apt install -y mate-core xrdp && sudo systemctl enable xrdp --now # 解决黑屏问题 echo "mate-session" > ~/.xsession && chmod +x ~/.xsession

2025-12-04 06:00:39

XRDP基于Windows 远程桌面协议性能较好

# Ubuntu/Debian sudo apt install xrdp sudo systemctl enable xrdp sudo systemctl start xrdp # CentOS/RHEL sudo yum install xrdp sudo systemctl enable xrdp sudo systemctl start xrdp

2025-12-04 05:07:27

Linux桌面KDE-Plasma

sudo apt install kubuntu-desktop # 或最小安装 sudo apt install plasma-desktop

2025-12-04 05:06:37

扫描匹配社交软件用户信息

https://github.com/qeeqbox/social-analyzer

2025-12-01 11:03:26

一键重装DD脚本

https://github.com/bin456789/reinstall

2025-12-01 10:59:27

一套指令修改默认DNS

sudo systemctl stop systemd-resolved sudo systemctl disable systemd-resolved sudo rm /etc/resolv.conf sudo nano /etc/resolv.conf 替换内容 nameserver 8.8.8.8 nameserver 8.8.4.4 sudo chmod 644 /etc/resolv.conf cat /etc/resolv.conf nslookup google.com

2025-11-27 20:56:17

Centos换源解决过期问题

bash <(curl -sSL https://linuxmirrors.cn/main.sh)

2025-11-27 09:09:58

测速跑分脚本

bash <(wget -qO- --no-check-certificate https://gitlab.com/spiritysdx/za/-/raw/main/ecs.sh)

2025-11-27 08:49:42

渐变色背景-示例

方案一:暖色调渐变(推荐) /* 替换原来的body背景样式 */ body { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); font-family: 'Roboto', sans-serif; min-height: 100vh; } 方案二:淡雅紫色渐变 /* 替换原来的body背景样式 */ body { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); font-family: 'Roboto', sans-serif; min-height: 100vh; } 方案三:清新绿色渐变 /* 替换原来的body背景样式 */ body { background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%); font-family: 'Roboto', sans-serif; min-height: 100vh; } 方案四:简约白色+微妙纹理 /* 替换原来的body背景样式 */ body { background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); font-family: 'Roboto', sans-serif; min-height: 100vh; } 方案五:日落橙粉渐变 /* 替换原来的body背景样式 */ body { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); font-family: 'Roboto', sans-serif; min-height: 100vh; }

2025-11-26 09:31:51

定时检查脚本运行状态

#!/bin/bash # 定义syncthing的路径 SYNCTHING_PATH="/root/syncthing-linux-amd64/syncthing" # 定义HOME环境变量 export HOME=/root # 检查syncthing是否已经运行 if pgrep -x "syncthing" > /dev/null; then echo "syncthing is already running." else echo "syncthing is not running. Starting syncthing..." nohup $SYNCTHING_PATH -no-browser -logfile /root/syncthing/syncthing.log > /dev/null 2>&1 & echo "syncthing started." fi

2025-11-26 03:05:05

文生图文字LOGO

用中文 “逆袭博客”,生成带有拖墨效果,漂带效果,波普艺术风格的LOGO。

2025-11-25 12:59:56