Book Image

Troubleshooting CentOS

By : Jonathan Hobson
Book Image

Troubleshooting CentOS

By: Jonathan Hobson

Overview of this book

Table of Contents (17 chapters)
Troubleshooting CentOS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

More about systemd


The systemd system and service manager is responsible for controlling how services are managed on CentOS 7. Things are very different now, and the consequence of this is to appreciate that, not only have the locations of the scripts changed to /usr/lib/systemd/systemd, but the older commands are to be depreciated to such an extent that (eventually) they will be expunged.

For example, when using systemd to check the status or start or stop a service, you can use one of the following commands:

# systemctl status <service_name>.service
# systemctl stop <service_name>.service
# systemctl start <service_name>.service

Moreover, rather than using chkconfig, to enable and disable a service during the boot sequence, you should now use:

# systemctl enable <service_name>.service
# systemctl disable <service_name>.service

You may be in two minds about this approach, but rather than dwelling on the subject of change, let's consider how we can use the new...