200-901 exam dumps

200-901 practice question 159 of 204

Cisco DevNet Associate. Associate level, Cisco. Free question with the correct answer and a full explanation.

200-901 Question 159

Select 2

You are tasked with managing a web application running on a Linux server. The application is controlled by a custom systemd service called 'webapp.service'. You need to ensure that the application starts automatically on system boot and verify its current status. Which set of commands should you use?

  1. A

    sudo systemctl enable webapp.service

  2. B

    sudo systemctl start webapp.service

  3. C

    sudo systemctl status webapp.service

  4. D

    sudo systemctl reboot webapp.service

  5. E

    sudo systemctl disable webapp.service

Show answer and explanation

Correct answers: A, C

Explanation

The task requires ensuring that the 'webapp.service' starts automatically on system boot and verifying its current status. To achieve this, the 'sudo systemctl enable webapp.service' command is used to configure the service to start on boot, and 'sudo systemctl status webapp.service' is used to check the current status of the service. Other commands, such as starting or disabling the service, do not align fully with the task requirements.

  • A. Correct.

    This command enables the 'webapp.service' to start automatically on system boot, which is required as part of the task.

  • B. Incorrect.

    This command starts the 'webapp.service' immediately, but the task does not explicitly require starting the service at this moment.

  • C. Correct.

    This command checks the current status of the 'webapp.service', which is required to verify its state.

  • D. Incorrect.

    This command does not exist in systemd. It is an invalid option for managing services.

  • E. Incorrect.

    This command disables the 'webapp.service' from starting automatically on system boot, which contradicts the task.

Timed practice exam

Take a 200-901 practice test under exam conditions

75 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam