启动服务
systemctl start redis.service关闭服务
systemctl stop redis.service重启服务
systemctl restart redis.service查看服务状态
systemctl status redis查看某个unit是否在运行
systemctl is-active redis.service查看所有units
systemctl list-units --all--type指定unit的类型,如service类型
systemctl list-units --type=service--state指定unit的状态,active表示在运行,inactive表示停止运行
systemctl list-units --type=service --state=active修改服务配置后重新加载
systemctl reload redis.service设置开机自启动
systemctl enable redis取消开机自启动
systemctl disable redis版权声明:本文为qq_38269333原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。