首页 > 系统服务 > 详细

Linux后台启动服务

时间:2021-09-12 04:45:52      阅读:30      评论:0      收藏:0      [点我收藏+]

systemctl 启动/关闭/启用/禁用服务 总结

  1. 启动服务

    systemctl start test.service
    
  2. 关闭服务

    systemctl stop test.service
    
  3. 重启服务

    systemctl restart test.service
    
  4. 显示服务的状态

    systemctl status test.service
    
  5. 在开机时启用服务

    systemctl enable test.service
    
  6. 在开机时禁用服务

    systemctl disable test.service
    
  7. 查看服务是否开机启动

    systemctl is-enabled test.service
    
  8. 查看已启动的服务列表

    systemctl list-unit-files|grep enabled
    
  9. 查看启动失败的服务列表

    systemctl --failed
    

应用

远程VScode服务器——code-server部署

  • Debian, Ubuntu

The standalone arm64 .deb does not support Ubuntu 16.04 or earlier. Please upgrade or build with yarn.

curl -fOL https://github.com/cdr/code-server/releases/download/v$VERSION/code-server_$VERSION_amd64.deb
sudo dpkg -i code-server_$VERSION_amd64.deb
sudo systemctl enable --now code-server@$USER
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml

参考:docs/code-server

Linux后台启动服务

原文:https://www.cnblogs.com/satire/p/15253436.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!