Linux基础命令大全

2021-08-31T00:12:00

常用命令

Linux更新及安装命令

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

Centos安装XZ压缩工具:yum install xz

Debian/Ubuntu 基础命令

更新软件源:apt-get update
更新升级所有软件:apt-get upgrade
清理旧版本的软件缓存: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
确认sshserver是否启动:ps -e | grep ssh

Centos安装neofetch

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

安装 epel-release:sudo yum install epel-release
添加第三方软件源:curl -o /etc/yum.repos.d/konimex-neofetch-epel-7.repo https://copr.fedorainfracloud.org/coprs/konimex/neofetch/repo/epel-7/konimex-neofetch-epel-7.repo
使用包管理器安装 neofetch:sudo yum install neofetch

Ubuntu/Centos换源

Ubuntu 换源:https://developer.aliyun.com/mirror/ubuntu
CentOS 换源:https://developer.aliyun.com/mirror/centos

打倒美帝搭建

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

打倒2官方脚本

打倒2官方的安装脚本命令:bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)

配置文件下载:wget https://raw.githubusercontent.com/bannedbook/fanqiang/master/v2ss/server-cfg/v2/config.json  -O -> /usr/local/etc/v2ray/config.json

备份配置文件:wget https://docs.devgox.com/wendang/config.json  -O -> /usr/local/etc/v2ray/config.json

打倒2重启命令:service v2ray restart

控制 打倒2 的运行的常用命令:service v2ray restart | force-reload |start|stop|status|reload

测试打倒2配置文件:/usr/local/bin/v2ray -test -config /usr/local/etc/v2ray/config.json
当前页面是本站的「Baidu MIP」版。发表评论请点击:完整版 »