Common CentOS7 system commands

Source: Internet
Author: User

Common CentOS7 system commands

My personal work is summarized for your reference. If anything is wrong, please point out and thank you.

View All Nic ip addresses -- ip addr

Start firewall -- systemctl start firewalld. service

Stop firewall -- systemctl stop firewalld. service

Disable firewall startup -- systemctl disable firewalld. service

List the running service status-systemctl

Start a service --systemctl start postfix.service

Close a service --systemctl stop postfix.service

Restart a service :--systemctl restart postfix.service

Display the status of a service --systemctl status postfix.service

Enable a service at startup --systemctl enable postfix.service

Disable a service at startup --systemctl disable postfix.service

Check whether the service is started --systemctl is-enabled postfix.service;echo $?

View the list of started services --systemctl list-unit-files|grep enabled

Set the system default startup running level 3 --ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target

Set the system default startup running level 5 --ln -sf/lib/systemd/system/graphical.target/etc/systemd/system/default.target

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.