CentOS7系統常用命令

來源:互聯網
上載者:User

CentOS7系統常用命令

個人工作總結出來供自行參考使用,如有不對之處還請大神們指出,感謝。

查看所有網卡IP地址——ip addr

啟動防火牆——systemctl start firewalld.service

停止防火牆——systemctl stop firewalld.service

禁止防火牆開機啟動——systemctl disable firewalld.service

列出正在啟動並執行服務狀態——systemctl

啟動一個服務——systemctl start postfix.service

關閉一個服務——systemctl stop postfix.service

重啟一個服務:——systemctl restart postfix.service

顯示一個服務的狀態——systemctl status postfix.service

在開機時啟用一個服務——systemctl enable postfix.service

在開機時禁用一個服務——systemctl disable postfix.service

查看服務是否開機啟動——systemctl is-enabled postfix.service;echo $?

查看已啟動的服務列表——systemctl list-unit-files|grep enabled

設定系統預設啟動運行層級3——ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target

設定系統預設啟動運行層級5——ln -sf/lib/systemd/system/graphical.target/etc/systemd/system/default.target

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.