




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































Question 1. Which component is responsible for loading the Linux kernel into memory during the boot process? A) UEFI firmware B) GRUB2 bootloader C) initramfs D) systemd Answer: B Explanation: GRUB2 (or another bootloader) reads the boot configuration and loads the selected kernel image into memory, then transfers control to it. Question 2. In a system using systemd, which command displays the current default target? A) systemctl get-default B) systemctl list-units --type=target C) systemctl default D) systemctl status default.target Answer: A Explanation: systemctl get-default prints the name of the target that the system will boot into by default.
Question 3. Which file is typically used to pass kernel parameters at boot time in a GRUB2 configuration? A) /etc/fstab B) /boot/grub/grub.cfg C) /etc/sysctl.conf D) /etc/default/grub Answer: D Explanation: /etc/default/grub contains the GRUB_CMDLINE_LINUX variable where kernel parameters are added; update-grub then generates /boot/grub/grub.cfg. Question 4. What is the purpose of the initramfs image during boot? A) Provide a minimal root filesystem for early userspace B) Store the kernel modules permanently C) Replace the bootloader after kernel loading D) Configure network interfaces before the kernel starts Answer: A Explanation: initramfs supplies a temporary root filesystem with necessary drivers and tools, allowing the real root filesystem to be mounted later.
A) lvcreate - L 20G - n lv_data vg_main B) vgcreate - L 20G - n lv_data vg_main C) lvcreate - n vg_main - L 20G lv_data D) vgextend - L 20G - n lv_data vg_main Answer: A Explanation: lvcreate - L <size> - n <lv_name> <vg_name> creates the logical volume with the specified size. Question 8. To reduce the size of an ext4 filesystem, which sequence is correct? A) resize2fs – P, then lvreduce, then mount B) umount, e2fsck - f, resize2fs
B) data=journal C) nodiratime D) delayed_alloc Answer: D Explanation: delayed_alloc tells ext4 to postpone block allocation until data is flushed, reducing fragmentation. Question 10. What does the xfs_growfs command do? A) Shrinks an XFS filesystem B) Extends an XFS filesystem to fill the underlying block device C) Checks XFS filesystem integrity D) Converts XFS to ext Answer: B Explanation: xfs_growfs expands an XFS filesystem to use all available space on the device. Question 11. Which quota command sets a hard limit of 5 GB for user alice on the filesystem mounted at /home? A) setquota - u alice 0 5000 0 0 /home B) edquota - u alice /home
D) /etc/rc.local Answer: B Explanation: Files in /etc/modules-load.d/ list modules to be loaded automatically during boot. Question 14. Which sysctl parameter controls the maximum number of open file descriptors system‑wide? A) fs.file-max B) net.core.somaxconn C) vm.overcommit_memory D) kernel.pid_max Answer: A Explanation: fs.file-max defines the total number of file handles the kernel will allocate. Question 15. A NIC shows “link down” in ip link show. Which command can be used to bring the interface eth0 up? A) ifconfig eth0 up B) ip link set eth0 down C) dhclient eth D) systemctl restart network
Answer: A Explanation: ifconfig eth0 up (or ip link set eth0 up) activates the interface; the question expects the classic ifconfig syntax. Question 16. Which configuration file is used by NetworkManager to define a static IPv4 address for interface enp2s0? A) /etc/sysconfig/network-scripts/ifcfg-enp2s B) /etc/NetworkManager/system-connections/enp2s0.nmconnection C) /etc/network/interfaces.d/enp2s0.cfg D) /etc/netplan/01-enp2s0.yaml Answer: B Explanation: NetworkManager stores per‑connection settings in /etc/NetworkManager/system-connections/ as .nmconnection files. Question 17. In ip route output, which keyword indicates a default route? A) 0.0.0.0/ B) default C) 255.255.255. D) ::/
Explanation: Adding the http service with --permanent updates the configuration and makes it persistent across reloads. Question 20. Which iptables target drops packets silently without sending any response? A) REJECT B) DROP C) LOG D) ACCEPT Answer: B Explanation: The DROP target discards packets without notifying the sender. Question 21. In nftables, what does the counter statement do? A) Increments a packet counter for a rule B) Blocks traffic from a specific IP C) Sets a rate‑limit on matching packets D) Logs matching packets Answer: A Explanation: counter updates packet and byte counters for the rule, useful for statistics.
Question 22. Which BIND configuration directive defines a zone that the server is authoritative for? A) view B) zone C) server D) master Answer: B Explanation: The zone statement in named.conf specifies the domain name, type, and file for an authoritative zone. Question 23. To test DNS resolution for example.com using a specific DNS server at 192.0.2.53, which command is appropriate? A) nslookup example.com 192.0.2. B) dig @192.0.2.53 example.com C) host - t A example.com 192.0.2. D) ping - c 1 example.com Answer: B Explanation: dig @<server> <domain> queries the specified DNS server directly.
Question 26. To generate an SSH key pair without a passphrase, which command is used? A) ssh-keygen - t rsa - N "" B) ssh-keygen - t ed25519 --no-passphrase C) ssh-keygen - t dsa - P "" D) ssh-keygen - t ecdsa - b 256 Answer: A Explanation: -N "" sets an empty passphrase, creating a key without one. Question 27. Which SSH configuration option disables password authentication, allowing only key‑based logins? A) PasswordAuthentication no B) PubkeyAuthentication yes C) PermitRootLogin no D) ChallengeResponseAuthentication no Answer: A Explanation: Setting PasswordAuthentication no in sshd_config disables password logins. Question 28. In NFSv4, which file controls export permissions on the server?
A) /etc/exports B) /etc/exports.d/nfs.conf C) /etc/nfs.conf D) /etc/fstab Answer: A Explanation: /etc/exports lists NFS export definitions, even for NFSv4. Question 29. Which option in /etc/exports enables Kerberos authentication for an NFS share? A) sec=krb B) auth=kerberos C) krb5=yes D) kerberos=on Answer: A Explanation: The sec=krb5 (or krb5i, krb5p) option specifies Kerberos security for NFS. Question 30. To create a Samba share that is read‑only for the group guests, which parameter is required in the share definition? A) read only = yes
C) if [[ $var ]]; then D) if [ "$var" ]; then Answer: A Explanation: -n tests for a non‑zero length string; it is the most explicit way. Question 33. Which command extracts the third column from a space‑delimited file data.txt using awk? A) awk '{print $3}' data.txt B) awk - F: '{print $3}' data.txt C) awk 'NR==3' data.txt D) awk '{print $3}' > data.txt Answer: A Explanation: awk '{print $3}' prints the third field of each line; default field separator is whitespace. Question 34. To perform an in‑place substitution that replaces “foo” with “bar” in file script.sh using sed, which command is correct? A) sed - i 's/foo/bar/g' script.sh B) sed 's/foo/bar/g' > script.sh C) sed - e 's/foo/bar/g' script.sh
D) sed - r 's/foo/bar/' script.sh Answer: A Explanation: -i edits the file directly; g ensures all occurrences on a line are replaced. Question 35. Which set option causes Bash to display each command and its arguments before execution, useful for debugging? A) - e B) - u C) - x D) - v Answer: C Explanation: set - x enables execution tracing, printing each command after expansion. Question 36. In a cron entry, what does the field “*/15” in the minute position mean? A) Every 15 minutes past the hour B) Every minute from 0 to 15 C) Every 15 seconds D) Every 15th minute of the day
Answer: D Explanation: OnCalendar uses a timestamp pattern; *-*-* 02:30:00 runs daily at 02:30. Question 39. Which Ansible module is used to manage YUM packages on Red Hat‑based systems? A) apt B) yum C) dnf D) package Answer: B Explanation: The yum module handles package installation, removal, and updates on RHEL/CentOS. Question 40. In Puppet, which file typically contains the node definitions? A) site.pp B) manifests.pp C) nodes.pp D) hiera.yaml Answer: A
Explanation: site.pp is the main manifest where node declarations are commonly placed. Question 41. Which Git command creates a new branch named feature and switches to it in a single step? A) git branch feature && git checkout feature B) git checkout - b feature C) git switch - c feature D) git create branch feature Answer: B Explanation: git checkout - b <branch> creates and checks out the new branch. Question 42. To view a concise one‑line summary of commits in the current branch, which Git option is used? A) git log --oneline B) git log - p C) git log --stat D) git log --graph Answer: A Explanation: --oneline prints each commit on a single line with abbreviated hash and message.