在Ubuntu系统中,服务可以通过命令行工具systemctl
来管理。以下是一些常见的服务操作:
sudo systemctl start serviceName
sudo systemctl stop serviceName
sudo systemctl restart serviceName
systemctl status serviceName
sudo systemctl enable serviceName
sudo systemctl disable serviceName
systemctl list-units --type=service
systemctl list-units --type=service --all
注意:上述命令中的serviceName
应替换为要操作的具体服务的名称。