/etc/sysconfig/jenkins vs /lib/systemd/system/jenkins.service

In one of the Jenkins labs I had to change the port from 8080 to 8090.

In the lab this was the config file path: /lib/systemd/system/jenkins.service

But in this article linux - how to change port number for Jenkins installation In Ubuntu 12.04 - Stack Overflow it is mentioned that the /etc/sysconfig/jenkins could be used. That doens’t work though, as the one suggested by your lab is the correct working one.

How these two config files relate to each other? I mean I’ve changed the sysconfig based one and it didn’t affect anything, only the .service file change was changing the port.

Hello @c410n
Jenkins 2.332.1 switched Jenkins from using System V init to use systemd with its Linux package installers for Debian, Ubuntu, Red Hat, Alma, openSUSE, Rocky, and more. The LTS Upgrade Guide describes that transition and how to adapt your environment to the transition.