精品丰满熟女一区二区三区_五月天亚洲欧美综合网_亚洲青青青在线观看_国产一区二区精选

  • <menu id="29e66"></menu>

    <bdo id="29e66"><mark id="29e66"><legend id="29e66"></legend></mark></bdo>

  • <pre id="29e66"><tt id="29e66"><rt id="29e66"></rt></tt></pre>

      <label id="29e66"></label><address id="29e66"><mark id="29e66"><strike id="29e66"></strike></mark></address>
      學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 操作系統(tǒng) > Linux教程 > linux systemctl命令詳解

      linux systemctl命令詳解

      時(shí)間: 佳洲1085 分享

      linux systemctl命令詳解

        systemctl命令是Linux下的一個(gè)命令,那么它具體語法是什么呢?下面由學(xué)習(xí)啦小編為大家整理了linux systemctl命令的相關(guān)知識(shí),希望對(duì)大家有幫助!

        linux systemctl命令說明

        systemctl命令是系統(tǒng)服務(wù)管理器指令,它實(shí)際上將 service 和 chkconfig 這兩個(gè)命令組合到一起。

        linux systemctl命令格式

        systemctl is-enabled iptables.service #查詢服務(wù)是否開機(jī)啟動(dòng)

        systemctl enable *.service #開機(jī)運(yùn)行服務(wù)

        systemctl disable *.service #取消開機(jī)運(yùn)行

        systemctl start *.service #啟動(dòng)服務(wù)

        systemctl stop *.service #停止服務(wù)

        restart *.service #重啟服務(wù)

        systemctl reload *.service #重新加載服務(wù)配置文件

        systemctl status *.service #查詢服務(wù)運(yùn)行狀態(tài)

        systemctl --failed #顯示啟動(dòng)失敗的服務(wù)

        systemctl list-unit-files --type=service #列出所有服務(wù)(包括啟用的和禁用的)

        systemctl mask *.service #屏蔽(讓它不能啟動(dòng)) s

        ystemctl unmask *.service #顯示服務(wù)

        linux systemctl命令實(shí)例

        1.啟動(dòng)nfs服務(wù)

        systemctl start nfs-server.service

        2.設(shè)置開機(jī)自啟動(dòng)

        systemctl enable nfs-server.service

        3.停止開機(jī)自啟動(dòng)

        systemctl disable nfs-server.service

        4.查看服務(wù)當(dāng)前狀態(tài)

        systemctl status nfs-server.service

        5.重新啟動(dòng)某服務(wù)

        systemctl restart nfs-server.service

        6.查看所有已啟動(dòng)的服務(wù)

        systemctl list -units --type=service

        7.開啟防火墻22端口

        iptables -I INPUT -p tcp --dport 22 -j accept

        如果仍然有問題,就可能是SELinux導(dǎo)致的

        關(guān)閉SElinux: 修改/etc/selinux/config文件中的SELINUX=””為disabled,然后重啟。

        徹底關(guān)閉防火墻:

        sudo systemctl status firewalld.service

        sudo systemctl stop firewalld.service

        sudo systemctl disable firewalld.service

      3582317