Linux后台启动服务
Posted Satire
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux后台启动服务相关的知识,希望对你有一定的参考价值。
systemctl 启动/关闭/启用/禁用服务 总结
-
启动服务
systemctl start test.service
-
关闭服务
systemctl stop test.service
-
重启服务
systemctl restart test.service
-
显示服务的状态
systemctl status test.service
-
在开机时启用服务
systemctl enable test.service
-
在开机时禁用服务
systemctl disable test.service
-
查看服务是否开机启动
systemctl is-enabled test.service
-
查看已启动的服务列表
systemctl list-unit-files|grep enabled
-
查看启动失败的服务列表
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
以上是关于Linux后台启动服务的主要内容,如果未能解决你的问题,请参考以下文章