Linux后台启动服务

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后台启动服务

上一篇:SpringBoot for MimeMessageHelper 发送邮件


下一篇:ld-linux.so.2: bad ELF interpreter