Steps to create systemctl startup script.
vim /etc/systemd/system/db2.service
[Unit]
Description=IBM Db2 Database
After=network.target
[Service]
ExecStart=/opt/ibm/db2/V11.5/bin/db2start
User=db2inst1
Group=db2grp1
Restart=always
[Install]
WantedBy=multi-user.target
Reload systemd to make it aware of the new service.
$sudo systemctl daemon-reload
Enable the service to start automatically on system reboot
$sudo systemctl enable db2.service
Command to Start/Status/Stop the Db2 service
sudo systemctl start db2.service
sudo systemctl status db2.service
sudo systemctl stop db2.service