systemctl enable --now docker 中--now是什么意思?


OK,在一次的部署docker的過程中,見到在部署文檔中,有這么個命令

systemctl enable --now docker 

那么這個 --now 參數是什么意思呢··· ···

查了下,就是:

設置為開機啟動,並且,現在啟動這個docker服務。

就是把原來的 enable之后start命令給合並到一起了。

以下是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操作成功了之后,關閉或啟動服務的操作才會發生。

OK,以上就是關於--now參數的介紹。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM