# Add Jenkins official GPG key to package manager.
$ curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee /usr/share/keyrings/jenkins-keyring.asc > /dev/null
# Add Jenkins repository to package manager source list.
$ echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] https://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list > /dev/null
# Check if update available for system packages.
$ sudo apt update
# Install Open JDK package from repository.
$ sudo apt install openjdk-17-jre
# Install Jenkins package from repository.
$ sudo apt install jenkins