Hint: Use wget and apt-key to add Jenkins key on Debian [OK]
Common Mistakes:
Using rpm commands on Debian
Trying to install a non-existent package 'jenkins-key'
Using curl without proper piping
3. After adding the Jenkins repository and updating package lists, what is the output of the command sudo systemctl status jenkins immediately after installation but before starting Jenkins?
medium
A. Active: active (running)
B. Active: inactive (dead)
C. Active: failed
D. Unit jenkins.service could not be found
Solution
Step 1: Understand Jenkins service state after installation
Installing Jenkins does not start the service automatically; it remains inactive.
Step 2: Interpret systemctl status output
Since Jenkins is not started yet, status shows inactive (dead), not running or failed.
Final Answer:
Active: inactive (dead) -> Option B
Quick Check:
Service inactive before start command [OK]
Hint: Service is inactive until explicitly started [OK]
Common Mistakes:
Assuming service auto-starts after install
Confusing 'failed' with 'inactive'
Expecting 'unit not found' after install
4. You installed Jenkins on Linux but the command sudo systemctl start jenkins fails with 'Failed to start jenkins.service: Unit not found.' What is the most likely cause?
medium
A. Jenkins package was not installed properly or repository not added
B. Java is not installed on the system
C. Firewall is blocking Jenkins port 8080
D. You need to reboot the system before starting Jenkins
Solution
Step 1: Analyze the error message
'Unit not found' means systemd cannot find the Jenkins service file, likely missing installation.
Step 2: Identify common causes
Missing or incorrect repository setup or failed package install causes service file absence.
Final Answer:
Jenkins package was not installed properly or repository not added -> Option A
Quick Check:
Missing service file means Jenkins not installed correctly [OK]
Hint: Check Jenkins package and repo if service unit missing [OK]
Common Mistakes:
Blaming firewall for service start failure
Assuming Java missing causes 'unit not found'
Thinking reboot fixes missing service unit
5. You want to install Jenkins on a Linux server and ensure it starts automatically on boot. Which sequence of commands correctly achieves this?