docker服务随开机一起启动
systemctl enable --now docker
以下是systemctl中关于--now参数的解释:
--now When used with enable, the units will also be started. When used with disable or mask, the units will also be stopped. The start or stop operation is only carried out when the respective enable or disable operation has been successful.
翻译:
- 1、当和enable一起使用的时候,设置为开机启动,然后启动服务
- 2、当和disable一起使用的时候,取消开机启动,关闭服务
- 3、只有当disable或者enable操作成功了之后,关闭或启动服务的操作才会发生。
标签:enable,服务,--,开机,disable,linux,自启动,now From: https://www.cnblogs.com/POTUS/p/17280069.html