Tools: Linux Services Made Simple: Create, Control, and Remove Your First systemd Service (2026)

Tools: Linux Services Made Simple: Create, Control, and Remove Your First systemd Service (2026)

Linux as a service (The simplest Way to Understand It)

What you'll learn

Step 1: Create a simple script

Step 2: Create a systemd service

Step 3: Reload systemd and start the service

Step 4: Check status

Step 5: Stop the service

Step 6: Enable / Disable (auto-start on boot)

Step 7: View logs (while service is running)

Step 8: Clean up (Delete everything properly)

Flow Diagram Think of a service like a car 🚗: The systemd is like the engine that keeps the car running smoothly behind the scenes. By the end of this, you’ll be able to: Now we tell systemd how to run our script. 👉 Replace /home/your-username with your actual username

(Don’t use $USER here — systemd won’t expand it properly) You should see the service running. -f - follow (like tail -f) …repeating every 5 seconds. Stop the service: sudo systemctl stop my-simple.service View logs again: sudo journalctl -u my-simple.service You will only see past logs (no new updates). [CAUTION: PLEASE BE CAREFUL WHEN DELETING THE SERVICE FILES SO WE DO NOT DELETE ANY SYSTEM FILES] Now your system is back to a clean state—no leftover services, no hidden issues. You just created and managed your first Linux service from scratch 🎉 This is a small step—but it’s exactly how real-world services (like web servers and databases) are managed in production. Disclaimer: I have used GH copilot for writing the topics, Gemini Nano Banana for image generation and ChatGPT for the flow diagram and other concepts. Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse

Command

Copy

$ -weight: 600;">sudo nano ~/my_simple_service.sh -weight: 600;">sudo nano ~/my_simple_service.sh -weight: 600;">sudo nano ~/my_simple_service.sh #!/bin/bash while true do echo "Hello! Service is running..." sleep 5 done #!/bin/bash while true do echo "Hello! Service is running..." sleep 5 done #!/bin/bash while true do echo "Hello! Service is running..." sleep 5 done chmod +x ~/my_simple_service.sh chmod +x ~/my_simple_service.sh chmod +x ~/my_simple_service.sh -weight: 600;">sudo nano /etc/systemd/system/my-simple.-weight: 500;">service -weight: 600;">sudo nano /etc/systemd/system/my-simple.-weight: 500;">service -weight: 600;">sudo nano /etc/systemd/system/my-simple.-weight: 500;">service [Unit] Description=My Simple Demo Service [Service] ExecStart=/home/$USER/my-simple--weight: 500;">service.sh Restart=always [Install] WantedBy=multi-user.target [Unit] Description=My Simple Demo Service [Service] ExecStart=/home/$USER/my-simple--weight: 500;">service.sh Restart=always [Install] WantedBy=multi-user.target [Unit] Description=My Simple Demo Service [Service] ExecStart=/home/$USER/my-simple--weight: 500;">service.sh Restart=always [Install] WantedBy=multi-user.target -weight: 600;">sudo -weight: 500;">systemctl daemon-reload -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">start my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl daemon-reload -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">start my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl daemon-reload -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">start my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">status my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">status my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">status my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">stop my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">stop my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">stop my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">enable my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">enable my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">enable my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">disable my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">disable my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">disable my-simple.-weight: 500;">service -weight: 600;">sudo journalctl -u my-simple.-weight: 500;">service -f -weight: 600;">sudo journalctl -u my-simple.-weight: 500;">service -f -weight: 600;">sudo journalctl -u my-simple.-weight: 500;">service -f "Hello! Service is running..." "Hello! Service is running..." "Hello! Service is running..." -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">stop my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">disable my-simple.-weight: 500;">service -weight: 600;">sudo rm /etc/systemd/system/my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl daemon-reload -weight: 600;">sudo rm ~/my_simple_service.sh -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">stop my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">disable my-simple.-weight: 500;">service -weight: 600;">sudo rm /etc/systemd/system/my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl daemon-reload -weight: 600;">sudo rm ~/my_simple_service.sh -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">stop my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">disable my-simple.-weight: 500;">service -weight: 600;">sudo rm /etc/systemd/system/my-simple.-weight: 500;">service -weight: 600;">sudo -weight: 500;">systemctl daemon-reload -weight: 600;">sudo rm ~/my_simple_service.sh - A -weight: 500;">service is just a program that runs in the background - -weight: 500;">systemctl is the tool to control it - systemd is the system that manages services - You can -weight: 500;">start it - You can -weight: 500;">stop it - You can check if it’s running - Create your own -weight: 500;">service - Start / -weight: 500;">stop it using -weight: 500;">systemctl - Enable / -weight: 500;">disable it at boot - Delete it cleanly (no leftover mess) - Ctrl + O --> Enter