# VPS常用命令脚本
> 作者: 成也 | 发布日期: 2026-09-03 | 最后更新: 2026-10-13 | 分类: 脚本 | 专题: 科学上网
> 原文链接: https://vpsbbc.com/blog/post/linux-order
> 实时库存监控大盘: https://vpsbbc.com/
> 核心摘要 (TL;DR): vps必备常用脚本大全
## LINUX命令大全

#### 一、Linux更新及安装命令

[card:https://vpsbbc.com | 热门服务器实时监控 | 提供搬瓦工、DMIT、VMISS等优质商家库存最新消息以及选购指南 | https://img.vpsbbc.com/vps-x.png]

```
Debian更新：apt-get update && apt-get upgrade
Centos更新：yum update
  
Debian安装curl：apt-get install curl
Centos安装curl：yum install curl
  
Debian安装wget：apt-get install wget
Centos安装wget：yum install wget
   
Debian/Ubuntu 基础命令
更新软件源：apt-get update
更新升级所有软件：apt-get upgrade
Centos安装XZ压缩工具：yum install xz
```

清理旧版本的软件缓存：sudo apt-get autoclean清理所有软件缓存：sudo apt-get clean删除系统不再使用的孤立软件：sudo apt-get autoremove

查看内核版本：uname -a查看ubuntu版本：cat /etc/issue

查看当前的内存使用情况：free -m查看当前有哪些进程：ps -A杀死一个进程：kill id / killall id / kill -9 id

安装 openssh-server

```
sudo apt-get install openssh-server
ps -e | grep ssh  #确认sshserver是否启动
```

##### Centos安装neofetch

```
Github官网：https://github.com/dylanaraps/neofetch/wiki/Installation
```

##### Linux开启原版BBR

```
echo "net.core.default\_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp\_congestion\_control=bbr" >> /etc/sysctl.conf
sysctl -p
lsmod | grep bbr
```

#### 二、Linux 常用的一键脚本

UnixBench跑分工具测试

UnixBench下载地址：[https://code.google.com/archive/p/byte-unixbench/downloads](https://code.google.com/archive/p/byte-unixbench/downloads)

wget --no-check-certificate [http://tools.laobuluo.com/tools/unixbench.sh](http://tools.laobuluo.com/tools/unixbench.sh)chmod +x unixbench.sh./unixbench.sh

##### bench.sh 测速脚本

```
Github地址：https://github.com/teddysun/across
wget -qO- bench.sh | bash
或者
curl -Lso- bench.sh | bash
```

##### BestTrace 路由追踪

```
wget https://cdn.ipip.net/17mon/besttrace4linux.zip
unzip besttrace4linux.zip
chmod +x besttrace
./besttrace 114.114.114.114
```

##### 流媒体解锁检测脚本

```
Github地址：https://github.com/sjlleo/netflix-verify
```

##### Netflix 解锁检测脚本

```
wget -O nf https://github.com/sjlleo/netflix-verify/releases/download/2.61/nf\_2.61\_linux\_amd64 && chmod +x nf && clear && ./nf
```

##### 三、一键DD纯净系统脚本(萌咖) CentOS/Debian/Ubuntu

**系统安装完成后的默认用户名为root，默认密码为: MoeClub.org**

```
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -d 11 -v 64 -a # Debian 11 64位

bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -u 20.04 -v 64 -a # Ubuntu 20.04 64位
```
