A quick reference table of systemctl and service on CentOS7 and Amazon Linux 2.
Must be run as root or sudo. Basically, I will write based on sudo.
systemctl and service are basically opposite
$ sudo systemctl start [UNIT]
$ sudo service [UNIT] start
Example
$ sudo systemctl start nginx
$ sudo service nginx start
Since the settings are applied, there should be no interruption of service.
$ sudo systemctl reload [UNIT]
$ sudo service [UNIT] reload
Example
$ sudo systemctl reload nginx
$ sudo service nginx reload
There is a momentary interruption of service.
$ sudo systemctl restart [UNIT]
$ sudo service [UNIT] restart
Example
$ sudo systemctl reload nginx
$ sudo service nginx reload
$ sudo systemctl stop [UNIT]
$ sudo service [UNIT] stop
Example
$ sudo systemctl stop nginx
$ sudo service nginx stop
$ sudo systemctl stop [UNIT]
$ sudo service [UNIT] stop
Example
$ sudo systemctl status nginx
$ sudo service nginx status
Setting whether to start the service automatically when the server starts.
$ sudo systemctl enable [UNIT]
$ sudo service [UNIT] enable
Example
$ sudo systemctl enable nginx
$ sudo service nginx enable
$ sudo systemctl enable [UNIT]
$ sudo service [UNIT] enable
Example
$ sudo systemctl enable nginx
$ sudo service nginx enable
$ sudo systemctl list-unit-files --type=service
$ sudo systemctl daemon-reload