











































































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 after the BIOS/UEFI stage? A) GRUB B) initrd C) systemd D) LVM Answer: A Explanation: GRUB2 (the bootloader) loads the kernel into memory after BIOS/UEFI hands control to it. Question 2. In the Filesystem Hierarchy Standard, which directory contains system-wide configuration files? A) /var B) /etc C) /usr D) /opt Answer: B Explanation: /etc is designated for host-specific configuration files. Question 3. Which command lists currently loaded kernel modules? A) modprobe – l B) lsmod C) modinfo – a D) insmod – list Answer: B Explanation: lsmod displays the list of loaded modules.
Question 4. What is the correct order of steps to compile software from source? A) make install, ./configure, make B) ./configure, make, make install C) make, ./configure, make install D) ./configure, make install, make Answer: B Explanation: The typical compile sequence is configure, then make, then make install. Question 5. Which utility shows detailed information about PCI devices? A) lsusb B) lspci C) lsscsi D) lshw Answer: B Explanation: lspci lists PCI bus devices. Question 6. Which command creates a new directory named “project”? A) mkdir project B) mkdir project C) touch project D) newdir project Answer: A Explanation: mkdir creates directories. Question 7. Which command displays the absolute pathname of the current working directory?
A) ln /etc/passwd link B) ln - s /etc/passwd link C) ln - f /etc/passwd link D) ln - h /etc/passwd link Answer: B Explanation: ln - s creates a soft (symbolic) link. Question 11. Which editor uses the command “:wq” to write and quit? A) nano B) vi C) emacs D) pico Answer: B Explanation: In vi/vim, :wq saves and exits. Question 12. Which command extracts the first 10 lines of a file named “log.txt”? A) head - n 10 log.txt B) tail - n 10 log.txt C) cat - 10 log.txt D) less - 10 log.txt Answer: A Explanation: head - n 10 prints the first 10 lines. Question 13. Which tool creates a compressed archive using gzip compression? A) tar - czf archive.tar.gz /dir
B) zip - r archive.zip /dir C) cpio - ovz > archive.cpio.gz D) dd if=/dev/zero of=archive.gz Answer: A Explanation: tar with - z option uses gzip. Question 14. Which command securely copies a directory recursively to a remote host? A) scp - r /src user@host:/dest B) rsync - a /src user@host:/dest C) cp - R /src user@host:/dest D) sftp - r /src user@host:/dest Answer: A Explanation: scp - r copies directories over SSH. Question 15. Which partition table scheme supports disks larger than 2 TiB? A) MBR B) GPT C) DOS D) BSD Answer: B Explanation: GPT (GUID Partition Table) handles disks >2 TiB. Question 16. Which command creates a physical volume on /dev/sdb1? A) pvcreate /dev/sdb B) vgcreate /dev/sdb
D) /etc/nfs.mounts Answer: A Explanation: /etc/fstab can contain NFS entries for persistent mounts. Question 20. Which command creates a RAID‑1 array named /dev/md0 with two devices? A) mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb B) mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb C) mdadm --build /dev/md0 /dev/sda1 /dev/sdb D) mdadm --add /dev/md0 /dev/sda1 /dev/sdb Answer: A Explanation: mdadm --create with level=1 and raid-devices=2 creates a mirrored array. Question 21. Which command displays free and used disk space in human‑readable format? A) du - h B) df - h C) lsblk - h D) fdisk - h Answer: B Explanation: df - h reports filesystem usage. Question 22. Which utility is used to open a LUKS encrypted partition? A) cryptsetup luksOpen /dev/sda1 crypt B) luksopen /dev/sda1 crypt C) dmsetup create crypt1 /dev/sda D) cryptmount /dev/sda
Answer: A Explanation: cryptsetup with luksOpen opens LUKS containers. Question 23. Which systemctl command disables a service from starting at boot? A) systemctl stop service B) systemctl mask service C) systemctl disable service D) systemctl freeze service Answer: C Explanation: disable removes the service from the boot sequence. Question 24. Which command shows a hierarchical view of running processes? A) ps aux B) top C) htop D) pstree Answer: D Explanation: pstree displays processes as a tree. Question 25. Which signal terminates a process gracefully, allowing cleanup? A) SIGKILL (9) B) SIGTERM (15) C) SIGSTOP (19) D) SIGSEGV (11) Answer: B
Explanation: ip addr show lists interfaces with addresses. Question 29. Which tool captures live packets and displays them in human‑readable form? A) ping B) traceroute C) tcpdump D) nslookup Answer: C Explanation: tcpdump captures and prints packet data. Question 30. Which file contains the system’s DNS resolver configuration? A) /etc/hosts B) /etc/resolv.conf C) /etc/nsswitch.conf D) /etc/dns.conf Answer: B Explanation: resolv.conf lists nameserver entries for DNS lookup. Question 31. Which command sends ICMP echo requests to test connectivity? A) ping host B) traceroute host C) mtr host D) netcat host 80 Answer: A Explanation: ping sends ICMP echo requests.
Question 32. Which command adds a static route for network 192.168.10.0/24 via gateway 10.0.0.1? A) ip route add 192.168.10.0/24 via 10.0.0. B) route add - net 192.168.10.0 netmask 255.255.255.0 gw 10.0.0. C) ip route set 192.168.10.0/24 gw 10.0.0. D) netstat route add 192.168.10.0/24 10.0.0. Answer: A Explanation: ip route add defines a new route. Question 33. Which package manager uses the command “dnf install httpd”? A) apt B) yum/dnf C) zypper D) pacman Answer: B Explanation: dnf (and yum) are RPM‑based managers. Question 34. Which command removes a package named “vim” on a Debian‑based system? A) dnf remove vim B) yum erase vim C) apt purge vim D) zypper rm vim Answer: C Explanation: apt purge removes the package and its configuration files.
Question 38. Which command sets the system time zone to “America/New_York”? A) timedatectl set-timezone America/New_York B) tzselect America/New_York C) ln - sf /usr/share/zoneinfo/America/New_York /etc/localtime D) echo "America/New_York" > /etc/timezone Answer: A Explanation: timedatectl manages the system clock and timezone. Question 39. Which practice improves system hardening by reducing the default umask? A) Set umask 077 in /etc/profile B) Set umask 022 in /etc/profile C) Remove umask from /etc/profile D) Set umask 666 in /etc/profile Answer: A Explanation: umask 077 creates files with permissions readable only by the owner. Question 40. Which command generates a self‑signed SSL certificate valid for 365 days? A) openssl req - new - x509 - days 365 - keyout key.pem - out cert.pem B) openssl genrsa - out key.pem 2048 C) certtool --generate-self-signed --days 365 D) ssh-keygen - t rsa - f cert.pem Answer: A Explanation: openssl req - new - x509 creates a self‑signed cert.
Question 41. Which PAM module is used to enforce password complexity? A) pam_unix.so B) pam_pwquality.so C) pam_limits.so D) pam_tally2.so Answer: B Explanation: pam_pwquality checks password strength. Question 42. Which file stores encrypted user passwords on modern Linux systems? A) /etc/passwd B) /etc/shadow C) /etc/group D) /etc/security/passwd Answer: B Explanation: /etc/shadow holds hashed passwords with restricted permissions. Question 43. Which command adds a user “alice” to the sudo group? A) useradd - G sudo alice B) usermod - a - G sudo alice C) groupadd sudo alice D) adduser alice sudo Answer: B Explanation: usermod - a - G appends alice to the sudo supplementary group. Question 44. Which firewall tool uses “nft list ruleset” to display current rules?
B) ssh-keygen - t dsa - f ~/.ssh/id_dsa C) ssh-keygen - t ecdsa - P "" - f ~/.ssh/id_ecdsa D) ssh-keygen - t ed25519 - b 4096 Answer: A Explanation: - N "" sets an empty passphrase. Question 48. Which permission set on a directory allows anyone to create files but not delete others’ files? A) 777 B) 755 C) 1775 D) 775 Answer: C Explanation: The sticky bit (1) on 1775 restricts deletion to owners. Question 49. Which command displays ACLs for /var/www/html? A) getfacl /var/www/html B) ls - l /var/www/html C) setfacl - L /var/www/html D) aclshow /var/www/html Answer: A Explanation: getfacl prints the access control list. Question 50. Which SELinux mode logs denials but does not enforce them? A) enforcing
B) permissive C) disabled D) targeted Answer: B Explanation: permissive mode records violations without blocking actions. Question 51. Which command prints the current SELinux context of a file? A) seinfo /path/file B) ls - Z /path/file C) getenforce /path/file D) audit2allow /path/file Answer: B Explanation: ls - Z shows SELinux security contexts. Question 52. Which line in a Bash script defines the interpreter to use? A) #!/bin/bash B) //#!/bin/bash C) %!/usr/bin/bash D) ::/bin/bash Answer: A Explanation: The shebang (#!) specifies the script’s interpreter. Question 53. Which Bash built‑in tests whether a file exists? A) test - e filename B) [[ - f filename ]]
D) rkt Answer: B Explanation: Podman is daemonless and supports rootless operation. Question 57. Which command lists all Docker images on the host? A) docker ps - a B) docker images C) docker list images D) docker img ls Answer: B Explanation: docker images displays available images. Question 58. Which command pulls the latest “nginx” image from Docker Hub? A) docker download nginx B) docker pull nginx:latest C) docker fetch nginx D) docker get nginx Answer: B Explanation: docker pull retrieves an image; “:latest” is implicit. Question 59. Which Docker networking mode shares the host’s network stack with a container? A) bridge B) host C) overlay D) macvlan
Answer: B Explanation: The host network driver gives the container the host’s interfaces. Question 60. Which Git command creates a new branch called “feature” and switches to it? A) git branch feature && git checkout feature B) git checkout - b feature C) git switch - c feature D) both B and C are correct Answer: D Explanation: Both git checkout - b and git switch - c create and switch. Question 61. Which command shows the commit history in a compact one‑line format? A) git log --oneline B) git log - p C) git log --stat D) git reflog Answer: A Explanation: --oneline condenses each commit to a single line. Question 62. Which cloud service model provides a complete platform for developers to deploy applications? A) IaaS B) PaaS C) SaaS D) DaaS