Jenkins Jenkins Installation and Configuration 1 — Questions and Answers
Question 1: What is the default port Jenkins runs on after a fresh installation?
- 8080 (Correct answer)
- 8443
- 9090
- 3000
Correct answer: 8080
Jenkins listens on port 8080 by default after installation.
Question 2: Which file contains the main Jenkins configuration settings?
- jenkins.xml
- config.xml (Correct answer)
- settings.xml
- jenkins.properties
Correct answer: config.xml
The config.xml file in the JENKINS_HOME directory stores the main Jenkins configuration.
Question 3: What is the JENKINS_HOME environment variable used for?
- To specify the Java installation path
- To define the root directory where Jenkins stores all its data (Correct answer)
- To set the Jenkins server URL
- To configure the admin user home
Correct answer: To define the root directory where Jenkins stores all its data
JENKINS_HOME specifies the root directory where Jenkins stores jobs, plugins, and configuration data.
Question 4: Which Java version is the minimum requirement for Jenkins LTS 2.x?
- Java 8
- Java 11 (Correct answer)
- Java 17
- Java 21
Correct answer: Java 11
Jenkins LTS 2.x requires Java 11 as the minimum supported version.
Question 5: What is the purpose of the Jenkins initialAdminPassword file?
- It stores hashed passwords for all users
- It provides the one-time setup password needed to unlock Jenkins for the first time (Correct answer)
- It contains the Jenkins API token
- It defines the default admin credentials
Correct answer: It provides the one-time setup password needed to unlock Jenkins for the first time
The initialAdminPassword file contains a one-time password required to complete the Jenkins initial setup wizard.
Question 6: Which command is used to restart Jenkins from the CLI without rebooting the server?
- jenkins --restart
- curl http://localhost:8080/restart (Correct answer)
- service jenkins reload
- jenkins service restart
Correct answer: curl http://localhost:8080/restart
You can restart Jenkins by sending a POST request to the /restart endpoint via curl or browser.
What is the default port Jenkins runs on after a fresh installation?