# 查询redis
ps aux | grep redis
# 结束进程id
kill -9 4461
# 批量结束任务 kill $(ps aux | grep '关键字' | awk '{print $2}')
kill $(ps aux | grep 'cobaltstrike' | awk '{print $2}')
# 查看运行的服务
ps -ef|grep redis
# 查看端口号
netstat -anp|grep 9876
lsof -i :6800
# 重启网卡
service network restart
# 启动服务器
service rocketmq start
# 重启与停止服务
systemctl redis start
systemctl redis stop
# 启用服务
systemctl enable redis
# 开机自动重启目录
/etc/systemd/system
/etc/init.d
# 虚拟机中enp0s3网卡位置
/etc/sysconfig/network-scripts/
# 添加全局环境变量
echo "export PATH=\$PATH:/www/server/nodejs/v16.17.1/bin">>~/.bashrc