本文主要是介绍Ubuntu18.04关闭docker开机自启动(六十四),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
第一种方式:systemctl启动方式
1.查看docker服务是否开机启动
# sudo systemctl list-unit-files | grep enable|grep docker
snap-docker-796.mount enabled
snap.docker.dockerd.service enabled2.关闭docker开机自启动
# systemctl disable snap.docker.dockerd.service
Removed /etc/systemd/system/multi-user.target.wants/snap.docker.dockerd.service.3.开启docker开机自启动
# systemctl enable snap.docker.dockerd.service4.关闭docker服务
# systemctl stop snap.docker.dockerd.service5.启动docker服务
# systemctl start snap.docker.dockerd.service6.查看docker服务是否启动
# sudo systemctl list-units --type=service|grep docker
snap.docker.dockerd.service loaded active running Service for snap application docker.dockerd
第二种方式:
1.关闭docker开机自启动
# systemctl disable docker.socket
# systemctl disable docker2.打开docker开机启动
# systemctl enable docker.socket
# systemctl enable docker查询docker当前状态
# sudo systemctl list-unit-files | grep enable|grep docker3.打开/关闭docker服务
# sudo service docker start
# sudo service docker stopOr
# systemctl stop docker
这篇关于Ubuntu18.04关闭docker开机自启动(六十四)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!