2026年3月28日 未分类
4.4 常见指令
Linux 服务器
# 判断系统
cat /etc/os-release
1 panel 面板
1 panel 相关
# 查看状态
1pctl status
# 启动 / 停止 / 重启
1pctl start
1pctl stop
1pctl restart
# 查看访问信息(地址/端口)
1pctl info
# 重置账号密码
1pctl reset
# 卸载 1Panel
1pctl uninstall
# 更新 1Panel
1pctl update
# 查看日志
1pctl logs
Docker 相关
# 查看容器
docker ps
# 查看所有容器
docker ps -a
# 重启 Docker
systemctl restart docker
# 查看端口占用
netstat -tulnp | grep 端口
Ubuntu 相关
# 查所有端口占用情况
ss -tulnp
# 查某一端口占用情况
ss -tulnp | grep 33983
# 允许/禁止外部访问你服务器的 33983 端口,ufw 命令是 Linux 防火墙
ufw allow 33983
ufw deny 33983
# 重新加载防火墙规则(应用)
ufw reload