DevOps Interview Questions and Answers

Hi Good morning ,
Please prepare the answers for below interview questions .Those questions are most frequently asked questions in interview.

Linux Interview question:

  • What is Linux?
  • Types of Linux Distribution?
  • How to check hostname in linux?
  • How to check ip adress in linux?
  • What is the use of whoami and who command?
  • What is pwd and cd and commands?
  • What is the use of Soft link and Hard link?
  • How to create the Soft link and Hard link in linux?
  • Difference between Soft link and Hard link?
  • What is inode number in linux?
  • How to create the empty file in linux?
  • What is the use of vi (or) vim command in linux
  • How to create the sub directories using mkdir command?
  • What is rm command and how to delete files and directories?
  • What is head and tail command in linux?
  • How to create and extract the tar file in linux?
  • How to create and extract the zip file in linux?
  • What is the use of ping and curl command?
  • What are the file permissions in Linux?
  • What is the use of chmod and chown command? give me one example?
  • What ls command? How to see the hidden files and give me some examples?
  • How to find out the files and directories usng file command?
  • What is the use of grep command and give me one example?
  • What is the use of ps -ef command in linux?
  • How to kill the process in linux?
  • What is PID and PPID?
  • How to create and delete the users and groups in linux?
  • What is the location of users and groups in linux?
  • How to addd the users in group?

Git Interview question:

  • What is Git?
  • What is the difference between GIT and SVN?
  • What are the advantages of using GIT?
  • How to check the GIT version?
  • How to intilalize the git?
  • Tell me about git workflow?
  • What is the command you can use to write a commit message?
  • What is the use of “git add” command?
  • What is “Staging Area” or “Index” in GIT?
  • How to create the branch in git?
  • How to delete the branch in git?
  • How to create and checkout the branch using single command in git?
  • How to check the branches?
  • How to merge one branch to another branch in git?
  • What is the use of “git rebase” command?
  • What is the difference “git merge” and “git rebase” ?
  • What is the use of “git revert” command? give me one example?
  • What is the use of “git log” command?
  • What is the use of “git status” command?
  • What is the use of “.gitignore” file in git?
  • How to add the remote repository in local?
  • How to clone the remote repository in local?
  • How to change the remote repository url in git?
  • What is the use of “remote -v” command in git
  • What is the use of “git pull” and “git push” and “git fetch” command in git?
  • What is the difference between “git pull” and “git fetch” ?
  • What is the use of “git stash” command in git?
  • What is the use of “git reset command? Types of “git reset” commands with examples?
  • Types of branching strategy in git?
  • What is the use of webhook in GITHUB (or) GITLAB?
  • How can conflict in git resolved?
  • Which plugin is use to configure Git in Jenkins?

Maven Interview question:

  • What is Maven?
  • What is the difference between MAVEN and GRADLE?
  • What is the difference between jar and war and ear ?
  • How to check the Maven version?
  • Types of build life cycles in MAVEN?
  • What is the difference between “mvn install” and “mvn deploy ” command?
  • What is the use of pom.xml in maven?
  • What are the mandatory option in pom.xml?
  • What are the options available in pom.xml?
  • What is the use of settings.xml in maven?
  • What is the difference between snapshot repository and release repository?
  • How to declare artifactory details in pom.xml?
  • Where to declare the sonarqube dependency in pom.xml?
  • Which plugin is use to configure Maven in Jenkins?

Nexus Interview question:

  • What is Nexus repository?
  • Why use Nexus?
  • What is the Advantage of Nexus?
  • What is the default port number of nexus?
  • How to change the port number of Nexus?
  • How to decalre nexus snapshot and release repository urls in maven?
  • Which plugin is use to configure Nexus in Jenkins?

Sonarqube Interview question:

  • What is Sonarqube?
  • Why use SonarQube ?
  • What is the Advantage of Sonarqube?
  • What is the default port number of Sonarqube?
  • How to change the port number of Sonarqube?
  • What is the default user name and password in SonarQube?
  • How to create reports in SonarQube?
  • How to decalre the Sonarqube in maven?
  • Which plugin is use to configure Sonarqube in Jenkins?

Tomcat Interview question:

  • What is Tomcat?
  • Why we use Tomcat?
  • What are the advantages of Tomcat?
  • What is the default port number of Tomcat?
  • What is the port number in Tomcat?
  • Types of roles are available in Tomcat?
  • Which plugin is use to configure Tomcat in Jenkins?

Jenkins Interview question:

  • What is Jenkins?
  • Why we use Jenkins?
  • What are the advantages of Jenkins?
  • What is the default port number of Jenins?
  • How to change the port number of Jenkins?
  • How many ways to install Jenkins in CENTOS 7?
  • What is the default location of Jenkins?
  • How to know the Jenkins version in CENTOS 7?
  • What is Continuous Integration in Jenkins?
  • What is the difference between Continuous Integration, Continuous Delivery, and Continuous Deployment?
  • what are the commands you can use to start Jenkins manually?
  • Name some of the SCM tools that are supported by Jenkins?
  • some of the useful plugins in Jenkin?
  • What are Triggers?
  • How will you define Post in Jenkins?
  • What are Parameters in Jenkins?
  • How you can set up a Jenkins job?
  • What is the solution if you find a broken build for your project?
  • What are the various ways in which the build can be scheduled in Jenkins?
  • Give any simple example of Jenkins script.
  • Which plugin is used to take the Backup in Jenkins?
  • What is Master node and Slave node in Jenkins?
  • What is build pipeline in Jenkins?
  • What is Jenkins Pipeline? What is a CI CD pipeline?
  • What is Jenkinsfile and What is the use of Jenkinsfile?
  • What are Declarative Pipelines in Jenkins?
  • What are Scripted Pipelines in Jenkins?
  • Which plugins are used to decalre the git , maven, nexus, sonarqube , tomcat,ansible, docker in Jenkins?

Ansible Interview question:

  • What is Ansible?
  • Why we use Ansible?
  • What are the advantages of Ansible?
  • How do you set up Ansible?
  • How to check the ansible version in CENTOS 7?
  • What is the default location for Ansible?
  • How do I see a list of all of the ansible_ variables?
  • How do you upgrade Ansible
  • Explain the term “fact” in Ansible.
  • What is inventory in ansible?
  • What is the use of ansible ad-hoc command? give me one example?
  • What is SSH ? and How many ways to setup the SSH to the destination servers ?
  • What is the use of public key and private key?
  • What is the use of ansible playbook?
  • How to write the ansible playbook?
  • What are the key things required for the playbook?
  • How to run the playbook in ansible?
  • What are ansible module?
  • What is Ansible Galaxy?
  • What is ansible roles?
  • How to create Ansible roles?
  • What is the difference between Ansible Playbook and Roles?
  • Why handlers are used in the playbook?
  • How to use existing tasks in Ansible?
  • How to secure Ansible playbooks?
  • What are the basic terminologies used in Ansible.
  • What is the use of templates in ansible role?
  • What is the use of ansible vault?
  • How do you use Ansible to create encrypted files?
  • How to encrypt a vault for existing file?
  • How to decrypt a vault file?
  • How to edit the encrypted file?
  • How to view the encrypted file?
  • How to change the vault password?
  • How to run a encrypted ansible playbook?
  • What is ask_pass in ansible?
  • Explain What is ask_sudo_pass
  • Explain what is ask_vault_pass?

Docker Interview question:

  • What is Docker?
  • What is the use of Docker?
  • What are are the advantages of Docker?
  • What are the main drawbacks of Docker?
  • What is the difference between a virtual machine and a container?
  • How to check the Docker version in CENTOS 7?
  • Explain Registries?
  • What is Docker image?
  • What is a Docker image registry?
  • Is there any problem with just using the latest tag in a container orchestration environment?
  • What is Dockerfile?
  • Tell me about Dockfile Instructions with example?
  • What is the difference between the COPY and ADD commands in a Dockerfile?
  • What is the difference between the CMD and ENTRYPOINT commands in a Dockerfile?
  • Can you explain dockerfile ONBUILD instruction?
  • Can you explain dockerfile VOLUME instruction?
  • Can you explain dockerfile FROM instruction?
  • What is the difference between Docker Image and Layer?
  • How will you monitor Docker in production?
  • What is Docker hub?
  • What is the use of Docker Container?
  • What are the advantages of using Docker container?
  • Is there a way to identify the status of a Docker container?
  • What command should you run to see all running container in Docker?
  • What is the command to run the image as a container?
  • Write the command to stop the docker container
  • What type of applications – Stateless or Stateful are more suitable for Docker Container?
  • What is the use of Docker Volume?
  • Where the docker volumes are stored?
  • How to create the Docker volume?
  • How to delete the unused docker volumes?
  • How to attach the docker volume to container?
  • What is the use of Docker Network?
  • What is the default Docker network driver, and how can you change it when running a Docker image?
  • How to create the dokcer network?
  • How to attached the docker network to the conatiner?
  • How to disconnect the docker network to the conatiner?
  • How to create the image from running container?
  • What’s the difference between up, run, and start?
  • What is the base image required to build a Docker container?
  • What command is used to goto inside running conatiner?