On a Linux system, services run in the background and manage some activities and functions. Gain a high-level look at how service management on CentOS works.
- [Instructor] On a CentOS system there's many services running in the background that take care of things like managing the network, keeping logs, running the firewall, and many other always on tasks, large and small. We can control these services and start our own in order to add capabilities to the system. The software in charge of managing services is systemd and the primary way we interact with systemd, for service management, is through the systemctl command. Typing systemctl by itself gives us a list of the services that are active on the system and to find out more about a service, we can type systemctl status and the service name, like rsyslog, the system logger. I won't dive too deep in service management here. For more, take a look at our courses on Service Management on Linux. Systemctl gives us a few more commands that are important to know as well. Start and stop are used to start and stop a service temporarily. Enable and disable are used to set whether a service starts automatically when the system is started up or not. And restart, stops and then starts a service. Services are defined in unit files, which can be found inside of usr, lib, systemd. They define what a service needs to start, what specific commands are run to start and stop the service, and which type a particular service is. If you're curious, take a moment to look at a unit file. Here for the rsyslog service the unit file is usr, lib, systemd, system, rsyslog dot service. Within this unit file you can see the description, what the service wants, where its documentation is located, information about the service, and so on. Again, we're not going to get into the details of services in this course, but I wanted to show you the basics as we explore other services in this chapter.
- What is CentOS?
- Installing CentOS
- Configuring networking manually
- Configuring the network with NetworkManager
- Connecting remotely
- Working with security-enhanced Linux (SELinux)
- Setting up a firewall
- Setting up a web server
- Sharing user home folders with Samba
- Setting up a desktop environment