8.3 Configure network services to start automatically at boot
πRed Hat Certified System Administrator (RHCSA β EX200)
In Red Hat Enterprise Linux (RHEL), when your server boots up, not all services start automatically by default. A network service like NetworkManager or a specific network interface might need to start on boot so your system can connect to networks without manual intervention. This is crucial in servers, data centers, and enterprise IT environments where human intervention isnβt always possible.
Hereβs everything you need to know for the exam.
1. Understanding Services and Targets
- Services are programs that run in the background, like networking (
NetworkManager,sshd,firewalld). - Systemd is the init system in RHEL that controls services and boot targets.
- Targets are like βmodesβ for your system. For example,
multi-user.targetis normal server mode without a graphical interface.
In the exam, you may need to ensure a network service starts automatically after boot.
2. Checking the Status of Network Services
Before configuring a service, you need to check its current status:
sudo systemctl status NetworkManager
You will see something like:
- Active: shows whether it is currently running
- Enabled: shows whether it starts on boot
3. Enabling a Network Service
To make a network service start automatically at boot, use the enable command:
sudo systemctl enable NetworkManager
enabletells systemd: βStart this service at boot.βdisabletells systemd: βDo not start this service at boot.β
Example:
If you want sshd (SSH service) to start automatically:
sudo systemctl enable sshd
4. Disabling a Network Service from Boot
Sometimes you might want to prevent a service from starting at boot:
sudo systemctl disable NetworkManager
- After running this, the service wonβt start automatically, but you can still start it manually with:
sudo systemctl start NetworkManager
5. Checking Which Services Are Enabled at Boot
To see which services are set to start at boot:
systemctl list-unit-files --type=service | grep enabled
- This shows all enabled services.
- You can also filter for network-related services:
systemctl list-unit-files --type=service | grep Network
6. Starting and Stopping Services Immediately
startβ starts the service now, but does not change boot behaviorstopβ stops the service now, but does not affect boot
Example:
sudo systemctl start NetworkManager
sudo systemctl stop NetworkManager
Remember: For exam purposes, enabling is what affects boot behavior.
7. Combining Enable and Start
If you want a service to start immediately AND at boot, you can use:
sudo systemctl enable --now NetworkManager
--nowoption starts it right away and enables it for future boots.- Very useful in exams to save time.
8. Exam Notes β Network Services Specifics
- Common network services you may need to manage:
NetworkManagerβ manages network interfacessshdβ allows remote login over SSHfirewalldβ firewall service
- For RHEL 8+, NetworkManager is usually the default network service.
- Old
network.service(from RHEL 7) is mostly replaced by NetworkManager in RHEL 8+. - Make sure the service is active and enabled for the system to function properly after reboot.
9. Quick Commands Summary
| Task | Command |
|---|---|
| Check status | systemctl status NetworkManager |
| Enable at boot | systemctl enable NetworkManager |
| Disable at boot | systemctl disable NetworkManager |
| Start immediately | systemctl start NetworkManager |
| Stop immediately | systemctl stop NetworkManager |
| Enable and start now | systemctl enable --now NetworkManager |
| List all enabled services | `systemctl list-unit-files –type=service |
10. Practical IT Scenario (Exam-Focused)
- Server setup: You install a new server that will act as a web server. After reboot, the network must be up automatically so other servers can reach it. You run:
sudo systemctl enable --now NetworkManager
- Remote access: You want SSH to always be available after a reboot so administrators can log in remotely:
sudo systemctl enable --now sshd
- Firewall management: Firewall rules must be active on boot:
sudo systemctl enable --now firewalld
These are real-world tasks that match the RHCSA exam objectives.
β Key Points for RHCSA Exam:
- Know the difference between
start/stop(immediate) andenable/disable(boot-time behavior). - Use
systemctlcommands for service management. - Network services like
NetworkManagerandsshdmust often start automatically. --nowsaves time by starting immediately and enabling at boot.- Be comfortable checking service status and listing enabled services.
This covers everything you need for RHCSA 8.3 β configuring network services to start at boot in a clear, exam-focused way.
