Intermediate Linux test (Intermediate)
30 questions · 35 minutes · Free
systemd, networking, logs and storage.
Take the Intermediate Linux test
What it covers
- systemd and services
- Networking tools
- Logs and journalctl
- Disks and filesystems
- SSH
Interview format
- Questions: 30 questions — 18 multiple choice, 12 multi-answer
- Time: 35 minutes, timed from the first question
- Difficulty: Intermediate
- Skill area: DevOps & cloud
- Price: Free
Earn a certificate
The Intermediate Linux test is one of the 8 tests of the DevOps Engineer: Intermediate learning path. Pass it and the other 7 tests at 70% or more and readyforhires issues you a verifiable certificate in your name, with its own code and verify link to share or add to LinkedIn.
Sample questions
5 sample questions from the Intermediate Linux test, with the answers. Samples are taken out of the live test, so you will not meet these when you sit it.
Which of the following commands ensures that the httpd service starts automatically at boot time in a systemd-based Linux system?
- systemctl start httpd
- systemctl enable httpd
- systemctl restart httpd
- systemctl status httpd
Answer: B. systemctl enable httpd
The command 'systemctl enable httpd' is used to enable a systemd service to start automatically at boot. The other options are either for checking the status of a service, starting a service manually, or restarting a service, none of which ensure automatic startup at boot.
How can cgroup limits be configured for a systemd service?
- cgroups can be configured in the [Service] section of a systemd unit file using the Slice= directive.
- cgroups can be configured using the systemctl set-cgroup command.
- cgroups can be configured using the systemd-cgls command.
- cgroups can be configured in the [Unit] section of a systemd unit file using the CGroup= directive.
Answer: A. cgroups can be configured in the [Service] section of a systemd unit file using the Slice= directive.
systemd allows cgroup limits to be configured for services using the Slice= directive in the [Service] section of a unit file. This allows services to be placed within specific cgroups, which can be used to enforce resource limits. Other options are incorrect because they describe unrelated concepts or incorrect methods for configuring cgroup limits in systemd.
Which of the following tools is commonly used for sandboxing services in systemd?
- systemd-nspawn
- systemd-sandbox
- systemd-container
- systemd-isolate
Answer: A. systemd-nspawn
systemd-nspawn is a tool that allows you to run isolated containers using systemd, which provides sandboxing for services. This is a common method to achieve service sandboxing in systemd. The other options are not related to systemd service sandboxing.
Which command is used to list all boot units in the systemd journal?
- journalctl --system
- journalctl --since '1 hour ago'
- journalctl --user
- journalctl --list-boots
Answer: D. journalctl --list-boots
To list all boot units in the systemd journal, the correct command is 'journalctl --list-boots'. Other options may provide log details but not the specific list of boot units.
What is the behavior of the command 'systemctl daemon restart' in systemd?
- systemctl daemon restart will not affect any services and is used solely for reloading configurations.
- systemctl daemon restart will stop all services and then restart them in the order they were started.
- systemctl daemon restart will reload the systemd configuration and restart the systemd manager, causing all active services to be re-evaluated and potentially restarted if their dependencies or configurations have changed.
- systemctl daemon restart will only restart services that have been explicitly marked for restart.
Answer: C. systemctl daemon restart will reload the systemd configuration and restart the systemd manager, causing all active services to be re-evaluated and potentially restarted if their dependencies or configurations have changed.
When you run 'systemctl daemon restart', it reloads the systemd configuration and restarts the systemd manager. This action ensures that any changes made to service units or configurations are applied, and active services are re-evaluated based on the updated configuration. It does not stop services unless their configuration or dependencies have changed.
Frequently asked questions
- How many questions are in the Intermediate Linux test?
- 30 questions (18 multiple choice, 12 multi-answer), with 35 minutes to answer them.
- What does the Intermediate Linux test cover?
- systemd and services, Networking tools, Logs and journalctl, Disks and filesystems, SSH.
- Is the Intermediate Linux test free?
- Yes. It is free to take with a readyforhires account.
- What level is the Intermediate Linux test?
- Intermediate, in DevOps & cloud.