Must-Know for Beginners: Linux Service Start and Stop Commands
This article introduces the basics of Linux service management, where mainstream distributions use the `systemctl` (systemd) tool to manage services. Key commands and their functions include: `start`/`stop` (start/stop), `restart` (restart), `reload` (reload configuration), `status` (check status), and `enable`/`disable` (enable/disable on boot), all requiring `root` or `sudo` privileges. Service names vary across distributions: for example, Apache is `httpd` in CentOS and `apache2` in Ubuntu; MariaDB (CentOS) or MySQL (Ubuntu) are the service names for database services. Common issues include: adding `sudo` for permission errors, using `status` or `journalctl` to troubleshoot startup failures, and searching for service names with `systemctl list-unit-files` if forgotten. Mastering core commands, service name differences, and troubleshooting methods enables proficient server service management.
Read More