一些常用的脚本

wget -O box.sh https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/box.sh && chmod +x box.sh && clear && ./box.sh

git clone https://github.com/kejilion/sh
wget -q https://github.com/Aniverse/A/raw/i/a && bash a

1.甲骨文DD脚本

DD成Debian 10

bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 10 -v 64 -p "自定义root密码" -port "自定义ssh端口"

DD成Ubuntu 20.04

bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -u 20.04 -v 64 -p "自定义root密码" -port "自定义ssh端口"

2、MoeClub脚本
重点推荐:

时间:22/11/2021 15:21 萌咖更新脚本:

1.新增对 Oracle AMD,Oracle ARM全面支持. 可支持从 Ubuntu, Oracle Linux 等系统网络重装.
2.更新 dd 镜像的基础系统版本.
3.移除对外部 wget 的依赖.
4.新增 -port 参数, 可更改默认SSH端口.
5.更新 内置的网络参数计算 逻辑.
6.更新 grub 配置文件定位逻辑, 可支持任意引导grub的系统.

以下系统已通过测试(其他自测):
Debian: 9, 10, 11;
Ubuntu: 18.04, 20.04;
CentOS: 6.10;
以下平台已通过测试(其他自测):
Oracle、Do、Azure

bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 10 -v 64 -p "自定义root密码" -port "自定义ssh端口"

-d 10 -v 64
-d 9 -v 64
-u 20.04 -v 64
-u 18.04 -v 64

开机改密码脚本:

开机改密:

#!/bin/bash
echo root:Vicer |sudo chpasswd root
sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;
sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
sudo reboot

3.另一位大佬的脚本

wget --no-check-certificate -O AutoReinstall.sh https://git.io/AutoReinstall.sh && bash AutoReinstall.sh
  • CentOS默认密码Pwd@CentOS 其它系统Pwd@Linux
  • OpenVZ / LXC 架构系统不适用
bash <(wget --no-check-certificate -qO- 'https://file.geekn.net/CNODnjau/InstallNET.sh') -d 11 -v 64 -a -firmware

-firmware 额外的驱动支持
-d 后面是系统版本号
-v 后面写64位 32位
-a (不清楚这个干啥的但是每个脚本都带)
–mirror 后面是镜像源地址

-p 后面写自定义密码

镜像站地址
官方给出的地址列表:https://www.debian.org/mirror/list

一些国内的
ftp.cn.debian.org
mirror.bjtu.edu.cn
mirror.lzu.edu.cn        
mirror.nju.edu.cn        
mirrors.163.com        
mirrors.bfsu.edu.cn        
mirrors.hit.edu.cn        
mirrors.huaweicloud.com        
mirror.sjtu.edu.cn        
mirrors.tuna.tsinghua.edu.cn        
mirrors.ustc.edu.cn        

使用方法:(大致都是一样的)

清华源
--mirror 'https://mirrors.ustc.edu.cn/debian/'

腾讯源
--mirror 'https://mirrors.aliyun.com/debian/'

阿里源
--mirror 'https://mirrors.aliyun.com/debian/'

华为源
--mirror 'https://mirrors.huaweicloud.com/debian/'

1.机器测试

来源:https://github.com/masonr/yet-another-bench-script

wget https://github.com/masonr/yet-another-bench-script/blob/master/yabs.sh

GeekBench

GB6 跑分脚本,附带宽测试:

curl -sL yabs.sh | bash

GB6 剔除带宽测试,因为都是国外节点测试,国内跑没多大意义:

curl -sL yabs.sh | bash -s -- -i

GB5 跑分脚本,附带宽测试:

curl -sL yabs.sh | bash -5

GB5 剔除带宽测试:

curl -sL yabs.sh | bash -s -- -i -5

单线程测试

bash <(curl -Lso- https://bench.im/hyperspeed)

最全测速脚本

curl -fsL https://ilemonra.in/LemonBenchIntl | bash -s fast

速度测试

显示延迟、抖动

bash <(wget -qO- https://bench.im/hyperspeed)

直接显示回程线路

curl https://raw.githubusercontent.com/zhucaidan/mtr_trace/main/mtr_trace.sh|bash
wget -q route.f2k.pub -O route && bash route
# 第一个

wget https://raw.githubusercontent.com/nanqinlang-script/testrace/master/testrace.sh
bash testrace.sh

# 第二个

wget -qO- git.io/besttrace | bash

四网测速

wget -O jcnf.sh https://raw.githubusercontent.com/Netflixxp/jcnfbesttrace/main/jcnf.sh

bash jcnf.sh

三网测速

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

带快速四网测试版本:

bash <(curl -Lso- https://dl.233.mba/d/sh/speedtest.sh)

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

测试25端口是否开放

telnet smtp.aol.com 25

测试IPv4优先还是IPv6优先

curl ip.p3terx.com

流媒体测试
全媒体测试

bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh)

奈飞测试

wget -O nf https://github.com/sjlleo/netflix-verify/releases/download/2.5/nf_2.5_linux_amd64 && chmod +x nf && clear && ./nf
# 第一个

bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh)

# 第二个

bash <(curl -sSL "https://github.com/CoiaPrant/MediaUnlock_Test/raw/main/check.sh")

CentOS 同步时间

yum -y install ntpdate
timedatectl set-timezone Asia/Shanghai
ntpdate ntp1.aliyun.com

CentOS 7 BBR

wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh

一键开启BBR
注意:需要Linux Kernel 内核升级到 4.9 及以上版本可以实现 BBR 加速

uname -srm

输出结果:

Linux 3.10.0-957.12.2.el7.x86_64 x86_64
3 - 内核版本.
10 - 主修订版本.
0-957 - 次要修订版本.
12 - 补丁版本.

一般来说,Ubuntu18.04以上就可以(默认的内核4.15)

echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf

sysctl -p

sysctl net.ipv4.tcp_available_congestion_control

lsmod | grep bbr
CentOS7配置BBR加速-铭心博客
CentOS7配置BBR加速-铭心博客
4年前
0708406

网站搭建

wget https://raw.githubusercontent.com/kejilion/sh/main/kejilion.sh
sudo bash kejilion.sh

Linux随机重命名文件夹下文件脚本

#!/bin/bash
for file in *.*; do
# 获取文件的基本名(不包含扩展名)
base=$(basename "$file" .*)

# 获取文件的扩展名
ext=$(basename "$file" | sed 's/^.*\.//')

# 生成一个包含10个随机字符的字符串
RAN=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 10)

# 重命名文件,保留扩展名
mv "$file" "${RAN}.${ext}"
done
© 版权声明
THE END
喜欢就支持一下吧!
点赞443 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容