Utilities for controlling system services
service command is a utility tool used to control system services in Redhat Linux-compatible distributions. It can start, stop, restart, and shut down system services. It can also display the current status of all system services.
service(option)(parameter)
-h: Display help information;
--status-all: Display the status of the service.
/etc/init.d
directory;When the host name, IP address and other information are modified, the network often needs to be restarted for it to take effect.
service network status
Configure the device:
lo eth0
Current active devices:
lo eth0
service network restart
Shutting down interface eth0: [OK]
Close loopback interface: [OK]
Set network parameters: [OK]
Pop up the loopback interface: [OK]
Pop-up interface eth0: [OK]
Restart mysql
service mysqld status
mysqld (pid 1638) is running...
service mysqld restart
Stop MySQL: [OK]
Start MySQL: [OK]