DevOps Questions

Last updated: March 26, 2026

DevOps questions allow you to assess a candidate’s proficiency with Linux through hands-on tasks. Each question provides a sandboxed Linux virtual machine (VM) where candidates complete real-world scenarios, such as:

  • Installing software packages

  • Creating files with specific content

  • Running command-line tools such as grep

Key benefits

HackerRank provides the following benefits for DevOps question types:

  • Dedicated Sandbox VM:

    • Provision an isolated Linux VM for each candidate.

    • Candidates interact with the VM through an in-browser terminal to complete all required tasks.

  • Performance evaluation: Test administrators can review candidate performance using:

    • Automated scoring scripts: Scripts validate whether the candidate completes the assigned tasks correctly.

    • Session playback: Playback lets administrators verify:

      • Whether the candidate uses the manual page (manpage command).

      • Whether the candidate performs tasks from memory.

      • The overall command-line workflow during the session.

    • Automated environment setup

      • Offers a fully configured environment.

      • Test creators do not need to perform any manual setup.

Creating a DevOps question

To create a DevOps question:

  1. Log in to your HackerRank for Work account using your credentials.

  2. Go to the Library tab. 

  3. Click Create Question.

    image.png
  4. Select DevOps under Projects.

    image.png

The DevOps question creation workflow opens with the following two steps.

Step 1: Settings

This step configures the environment and scripts required for the question.

  1. In the Environment Settings section:

    1. Select an operating system from the Operating System dropdown.

      image.png
    2. Select Yes or No from the Root Access dropdown.

      image.png

      Note: Candidates receive root access through the sudo command. If any question in the test requires elevated privileges, the platform automatically grants the candidate root access for the entire session. 

  2. In the Scripts section:

    1. Configure the Setup Script to initialize the environment before the candidate logs in. The platform executes this script at server startup. You can use this script to install packages or create sample files. The Setup Script timeout limit is five minutes.

      image.png
    2. Configure the Scoring Script to evaluate the candidate’s performance after they submit their solution. You can use this script to define custom scoring logic and award partial credit as needed. The Scoring Script timeout limit is twenty minutes. For more information, see Scoring a DevOps Question in tests.

      image.png
    3. (Optional) Configure the Evaluator Solution to store the correct answer to the problem for reference. You can use this script to solve the question during debugging or testing when you try the test as a recruiter or admin. The platform does not run this script. This script is placed in the /tmp folder.

      image.png

      Note: Click the expand icon to view the script editor in full screen.

      image.png
  3. Click Validate.
    A success message appears when validation completes.

    image.png
  4. Click Next.

Note:

  • Validation fails if the Setup Script or Scoring Script does not run successfully. To troubleshoot, click View Log.

    image.png
  • If some test cases pass by default, the system displays a warning during validation. Hover over the information icon to view details.

    image.png
  • If the scripts contain syntax errors, the system displays a dialog box. Click View full log to review the errors.

    image.png

Step 2: Details

  1. In the Problem Details section:

    image.png
    1. Enter the Question name.

    2. Enter the Score and Recommended time based on question difficulty.

      Difficulty

      Score

      Recommended Time

      Easy

      50 Points

      15 Minutes

      Medium

      75 Points

      30 Minutes

      Hard

      100 Points

      45-60 Minutes

    3. Add Tags from the drop-down list or create new ones.

    4. Describe the problem in the Problem description field. You can use the formatting menu to format the text or to include elements such as tables or images.

  2. (Optional) Add Interviewer guidelines for internal use, such as evaluation notes, hints, or reference solutions.

    image.png

    Note: Click Try question to view how the question appears to candidates.

  3. Click Save.

The question appears under My Company questions in the HackerRank Library.

Candidate experience

Candidates can use the terminal to perform the tasks described in the question.

image.png

Scoring a DevOps question in tests

DevOps questions use automatic evaluation. The platform runs a Bash scoring script to validate tasks and assign scores.

The scoring script determines whether the candidate receives full credit, partial credit, or no credit, based on its output and exit status.

Partial credit logic

If the scoring script prints one or more lines in the following format:

Partial Credit: <value>%

The system calculates the score as follows:

  • The system adds all printed percentage values to calculate a total percentage score (x%).

  • The candidate receives x% of the maximum score assigned to the question.

  • If the percentage symbol (%) is missing, the system treats the value as a percentage.

    • Example: Partial Credit: 50 is equivalent to Partial Credit: 50%.

  • If a printed value is less than 0%, the system ignores it.

  • If a printed value is greater than 100%, the system treats it as 100%.

Scoring based on script exit status

If the scoring script does not print any lines in the Partial Credit: <value>% format, the system assigns the score based on the script’s exit code:

  • Exit code 0: The candidate receives 100% of the maximum score.

  • Non-zero exit code: The candidate receives 0 points.