VPS常用命令

一、前言

由于记不住众多命令

于是在此记录。

二、命令

①系统更新

apt update -y
apt install -y curl
apt-get install sudo
apt update -y && apt install -y curl socat wget

 

②XUI脚本

bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)

 

③流媒体测试

bash <(curl -L -s media.ispvps.com)

 

④三网回程测试

curl https://raw.githubusercontent.com/zhucaidan/mtr_trace/main/mtr_trace.sh|bash

 

⑤搬瓦工DNS解锁

搬瓦工提供的NS服务可解锁ChatGPT,把服务器nameserver设置成172.31.255.2即可:

echo "nameserver 172.31.255.2" > /etc/resolv.conf

确保resovle.conf中是172.31.255.2,或者openai的相关域名解析结果是172.31.255.2都可以,172.31.255.2是瓦工提供的一个反向代理。

最后,重启服务器后瓦工会还原配置文件,那么还需要运行下面命令锁住文件:

chattr +i /etc/resolv.conf

 

⑥宝塔证书地址

公钥:

/www/server/panel/vhost/cert/域名/fullchain.pem

私钥:

/www/server/panel/vhost/cert/域名/privkey.pem

 

⑦宝塔Debian安装

wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh ed8484bec

⑧dd win

如果要dd成windows
我推荐使用leitbogioro大佬的

bash <(curl -sSL https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh) -windows 2019  -lang "cn"

如果想d别的版本,直接改就行 -windows 10/11/2012/2016/2019/2022
密码Teddysun.com

⑨docker

curl -fsSL https://get.docker.com | sh && ln -s /usr/libexec/docker/cli-plugins/docker-compose /usr/local/bin

 

阅读剩余
THE END