VPS 常用命令
🌶 过期警告: 本页面距今已有 2034 天未更新,年久失修,内容可能有所偏颇,还请仔细甄别!
VPS 常用命令
宝塔面板
# centosyum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh
# debianwget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh
# fedorawget -O install.sh http://download.bt.cn/install/install_6.0.sh && bash install.sh
# 更新curl http://download.bt.cn/install/update6.sh|bash
5 collapsed lines
# 删除登录验证sed -i "s|if (bind_user == 'True') {|if (bind_user == 'REMOVED') {|g" /www/server/panel/BTPanel/static/js/index.jsrm -rf /www/server/panel/data/bind.pl# 还原绑定sed -i "s|if (bind_user == 'REMOVED') {|if (bind_user == 'True') {|g" /www/server/panel/BTPanel/static/js/index.jsBBR 加速
wget --no-check-certificate -O tcp.sh https://github.com/cx9208/Linux-NetSpeed/raw/master/tcp.sh && chmod +x tcp.sh && ./tcp.sh
wget -O tcp.sh mcnb.top/tcp.sh && bash tcp.sh
wget "https://dt.yixiagege.cn/shell/TCP-CN.sh" && chmod +x TCP-CN.sh && ./TCP-CN.sh回程路由
wget https://raw.githubusercontent.com/nanqinlang-script/testrace/master/testrace.shbash testrace.sh
bash <(curl -sL mcnb.top/besttcp.sh)测速
# SuperBenchwget -qO- --no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bashcurl -Lso- -no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash
# Zbenchwget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZBench-CN.sh && bash ZBench-CN.shwget -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/ZBench/master/ZBench.sh && bash ZBench.sh
# SuperSpeedbash <(curl -Lso- https://git.io/superspeed)
# LemonBenchcurl -fsL https://ilemonra.in/LemonBenchIntl | bash -s fast
# 91yun1 collapsed line
wget -N --no-check-certificate https://raw.githubusercontent.com/91yun/91yuntest/master/test.sh && bash test.sh -i "io,bandwidth,chinabw,download,traceroute,backtraceroute,allping"更改 SSH 端口
# 备份cp /etc/ssh/sshd_config /etc/ssh/sshd_config.backup# 更改端口vim /etc/ssh/sshd_config# 重启服务systemctl restart sshd# 设置防火墙# firewallfirewall-cmd --permanent --zone=public --add-port=xxxx/tcpfirewall-cmd --reload# iptablesiptables -A INPUT -p tcp --dport xxxx -j ACCEPTservice iptables savesystemctl enable iptables一键安装 File2Ban
# 安装wget https://raw.githubusercontent.com/FunctionClub/Fail2ban/master/fail2ban.shbash fail2ban.sh# 卸载wget https://raw.githubusercontent.com/FunctionClub/Fail2ban/master/uninstall.shbash uninstall.shBrook 中转
wget -N --no-check-certificate https://zhujiget.com/wp-content/uploads/2020/brook-pf.sh && chmod +x brook-pf.sh && ./brook-pf.sh添加 Swap 分区
wget https://www.moerats.com/usr/shell/swap.sh && bash swap.shbuyvm 挂载存储块
# 查询存储块IDls /dev/disk/by-id/# 格式化硬盘mkfs.ext4 -F /dev/disk/by-id/scsi-0BUYVM_SLAB_VOLUME-xxxx# 创建挂载点mkdir /mnt/pan# 挂载硬盘mount -o discard,defaults /dev/disk/by-id/scsi-0BUYVM_SLAB_VOLUME-xxxx /mnt/pan# 开机自动挂载echo '/dev/disk/by-id/scsi-0BUYVM_SLAB_VOLUME-xxxx /mnt/pan ext4 defaults,nofail,discard 0 0' | sudo tee -a /etc/fstab一键查询主机是否解锁 Netflix
bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh) 赞赏博主
