Hermit Notebook

# Create a custom systemd service.

Reminder: you can left-scroll and right-scroll the long code blocks

This article shows how to create custom service running under systemd on Linux. This way, you can use the same command you use to manage an Apache or Nginx services, but this time to manage you own services.

## Create a cusom systemd service

1. Create a hermit.service file in the directory /etc/systemd/system/. In the exemple above, other options for ̀Type (under [Service]) include forking, and other options for Restart include always and on-abort.

2. Start the service:

3. Let the service start at boot:

## Basic service management

### Check the status of a services

This command will let you see if the service is running, show you its uptime and display its latest logs.

### Check the logs of the services

This command get the last 100 logs from the given service.