banner
破影岚歌

破影岚歌的博客

bilibili
twitter
github

7. Common Commands in CentOS 7

Common Commands in CentOS7#

System Commands#

  1. Check runlevel: runlevel

    Knowledge about runlevel commands:

    0: Shutdown
    1: Single-user text mode (password recovery)
    2:
    3: Multi-user text mode
    4:
    5: Multi-user graphical mode
    6: Reboot
    
  2. Switch runlevel: init

  3. Clear screen command: clear

Network Commands#

  1. View local IP: ip addr

  2. Test network connectivity: ping

Service Commands#

systemctl: Manage services

systemctl service_name status: Check service status

systemctl service_name stop: Stop service

systemctl service_name start: Start service

systemctl service_name restart: Restart service

systemctl service_name enable: Enable service at startup

systemctl service_name disable: Disable service at startup


getenforce: Check the status of selinux

setenforce: Set selinux status

Other Commands#

echo: Print message


tar -z

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.