linux 常用命令和脚本
源自网络,感谢大佬的付出,脚本基于debian,理论上适用于debain和ubuntu,centos请自测
# 修改ssh端口【还要去掉前面的注释 #】
vi /etc/ssh/sshd_config
# 修改root密码
passwd
# 重启vps
reboot
# 查看进程
ps aux
# 查看vps运行时间,内存占用
top
# 查询更新
apt update
# 运行更新
apt upgrade
# 升级系统
apt-get update
# 安装curl
apt-get install curl
# 安装wget
apt-get install wget
# DD debian系统,其中10代表debian系统版本,可修改为8 9,64代表64位,可修为32,即32位,DD完成后,root密码为:MoeClub.org,请第一时间修改
bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 10 -v 64 -p MoeClub.org -port 22 -a -firmware
curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh || wget -O ${_##*/} $_
bash reinstall.sh debian 10 --password 密码
# OVH DD debian专用
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 10 -v 64 -a --ip-addr 147.135.xxx.xxx --ip-gate 147.135.xxx.x --ip-mask 255.255.0.0
bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -d 10 -v 64 -a --ip-addr 194.87.xxx.xxx(改成ifconfig获取到的) --ip-gate 194.87.xxx.xxx(改成route获取到的) --ip-mask 255.255.xxx.xxx(改成你获取到的)
# 安装v2ray
bash <(curl -s -L https://git.io/v2ray.sh)
# 安装bbr
wget --no-check-certificate -O tcp.sh https://github.com/cx9208/Linux-NetSpeed/raw/master/tcp.sh && chmod +x tcp.sh && ./tcp.sh
# 中继转发
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubiBackup/doubi/master/iptables-pf.sh && chmod +x iptables-pf.sh && bash iptables-pf.sh
# DD 中文版win7,DD完成后,初始密码为:MoeClub.org,请第一时间修改
wget --no-check-certificate -qO DebianNET.sh 'https://moeclub.org/attachment/LinuxShell/DebianNET.sh' && bash DebianNET.sh -dd 'https://down.moerats.com/Windows/win7embx86-auto.gz'