Common basic command – process class

centOS6

Standardized procedures registered in the system

- service service name start-service service name stop-service service name reload-service service name statusCopy the code
  • To view the service, run the /etc/init.d/ service name command

  • Run the chkconfig command to set automatic startup

  • See the chkconfig – list | gerp XXX

  • Chkconfig -level 5 Service name on

Linux has seven runlevels: The commonly used levels are 3 and 5

Running level 0: the system is stopped. The default running level cannot be set to 0. Otherwise, the system cannot start normally

  • Running level 1: single user, root for system maintenance. Remote login is prohibited
  • Run level 2: Multi-user (without NFS), no network supported
  • Run level 3: Full multi-user (with NFS), login to console command line mode
  • Running level 4: The system is not used. Reserved
  • Run level 5: X11 console, enter graphical GUI mode after login
  • Run level 6: The system shuts down and restarts normally. The default run level cannot be set to 6. Otherwise, the system cannot start normally.

centOS7

Service systemct restart Service name (xxxx.service) systemctl stop Service name (xxxx.service) systemctl reload Service name Service name (xxxx.service) systemctl status Service name (xxxx.service)/usr/lib/systemd/system
Command to view the service

systemctl list-unit-files
systemctl --type service

Run the systemctl command to set automatic startupSince the launch systemctlenableService_ _name Does not start systemctl automaticallydisable service_ name
Copy the code