














































































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 OSI layer is responsible for end‑to‑end reliability and flow control? A) Physical B) Data Link C) Transport D) Session Answer: C Explanation: The Transport layer (layer 4) provides reliability (e.g., TCP) and flow control mechanisms. Question 2. In the OSI model, which protocol operates at the Network layer? A) HTTP B) IP C) Ethernet D) FTP Answer: B Explanation: IP (Internet Protocol) is a Network‑layer (layer 3) protocol that routes packets between hosts. Question 3. Which command displays the current systemd target (runlevel) on a modern Linux system? A) runlevel B) systemctl get-default C) systemctl list‑units --type=target D) systemctl isolate Answer: B
Explanation: systemctl get-default prints the default target, equivalent to the traditional runlevel. Question 4. To permanently assign a static IPv4 address using the ip command, which file is typically edited on a RHEL‑based system? A) /etc/network/interfaces B) /etc/sysconfig/network-scripts/ifcfg‑eth0 C) /etc/rc.d/rc.local D) /etc/hosts Answer: B Explanation: RHEL stores interface configuration in /etc/sysconfig/network- scripts/ifcfg‑<interface>. Question 5. Which CIDR notation represents the subnet mask 255.255.252.0? A) / B) / C) / D) / Answer: A Explanation: 255.255.252.0 has 22 leading 1‑bits, so the CIDR suffix is /22. Question 6. Which of the following is a Class B private IPv4 network? A) 10.0.0.0/ B) 172.16.0.0/ C) 192.168.0.0/ D) 169.254.0.0/
D) /etc/hostname Answer: C Explanation: /etc/nsswitch.conf defines the order of name‑service sources; typically “files dns”. Question 10. Which DNS record type maps an IPv6 address to a hostname? A) A B) AAAA C) CNAME D) PTR Answer: B Explanation: AAAA records store IPv6 addresses for a hostname. Question 11. Which command would you use to test DNS resolution for the domain example.com and display the raw query/response? A) nslookup example.com B) dig example.com +short C) host example.com D) dig example.com Answer: D Explanation: dig example.com provides a detailed DNS query and response. Question 12. Which of the following commands displays all listening TCP sockets on a Linux system? A) netstat - tuln B) ss - tuln
C) lsof - iTCP - sTCP:LISTEN D) All of the above Answer: D Explanation: All three commands can list listening TCP sockets; ss is the modern replacement for netstat. Question 13. Which utility can capture packets on an interface and display them in human‑readable form without a GUI? A) wireshark B) tcpdump C) nmap D) traceroute Answer: B Explanation: tcpdump captures and prints packet headers to the console. Question 14. Which option of ping sends only three echo requests? A) -c 3 B) -n 3 C) -t 3 D) -l 3 Answer: A Explanation: -c <count> limits the number of packets sent. Question 15. Which command shows the round‑trip time to each hop along the path to 8.8.8.8? A) traceroute 8.8.8.8
A) PermitRootLogin no B) AllowRootLogin no C) RootLogin disabled D) PasswordAuthentication no Answer: A Explanation: PermitRootLogin no disables direct root logins via SSH. Question 19. Which command securely copies a local file report.txt to a remote host host.example.com user bob preserving permissions? A) scp report.txt [email protected]:/home/bob/ B) sftp [email protected] <<EOF put report.txt C) rsync - avz report.txt [email protected]:/home/bob/ D) ssh [email protected] "cat > report.txt" Answer: A Explanation: scp copies files over SSH; it preserves permissions by default. Question 20. Which protocol does sftp rely on for its transport? A) FTP B) SCP C) SSH D) TLS Answer: C Explanation: sftp (SSH File Transfer Protocol) runs over an SSH connection.
Question 21. Which package provides the BIND DNS server daemon on Debian‑based systems? A) bind9 B) named C) dnsmasq D) named-utils Answer: A Explanation: The BIND server package is named bind9 in Debian/Ubuntu. Question 22. In a BIND zone file, which record type creates an alias for www.example.com pointing to example.com? A) A B) CNAME C) MX D) PTR Answer: B Explanation: CNAME creates a canonical name alias. Question 23. To test a DNS server's response for mail.example.com using dig, which option forces the query to a specific server at 192.0.2.53? A) dig @192.0.2.53 mail.example.com B) dig - s 192.0.2.53 mail.example.com C) dig - server 192.0.2.53 mail.example.com D) dig - q mail.example.com 192.0.2.53 Answer: A Explanation: Prefixing the server with @ tells dig which DNS server to query.
Question 27. Which command disables the mod_status module in Apache on a system using a2dismod? A) a2dismod status B) a2dismod mod_status C) apachectl - D status D) systemctl disable apache2-status Answer: B Explanation: a2dismod mod_status disables the module on Debian‑based distributions. Question 28. Which SMTP status code indicates that the mail was successfully queued for delivery? A) 250 B) 354 C) 421 D) 550 Answer: A Explanation: 250 “OK” is the standard success code for SMTP commands. Question 29. Which configuration parameter in Postfix controls the networks that are allowed to relay mail? A) myhostname B) mydestination C) mynetworks D) relay_domains Answer: C Explanation: mynetworks lists trusted client networks permitted to relay through Postfix.
Question 30. To enable IMAP access in Dovecot, which protocol must be listed in /etc/dovecot/conf.d/10-master.conf? A) pop3 B) imap C) lmtp D) smtp Answer: B Explanation: Adding imap under the service imap section enables the IMAP service. Question 31. Which file on a Linux client defines NFS mount points that persist across reboots? A) /etc/fstab B) /etc/exports C) /etc/nfs.conf D) /etc/mount.conf Answer: A Explanation: /etc/fstab can contain NFS entries to be mounted automatically at boot. Question 32. In the Samba configuration file smb.conf, which global parameter defines the workgroup name? A) netbios name B) workgroup C) domain D) server string Answer: B
Explanation: Both the modern ip link add … type vlan and legacy vconfig can create VLAN interfaces. Question 36. Which DHCP lease file on a Debian system stores the current lease information? A) /var/lib/dhcp/dhclient.leases B) /etc/dhcp/dhclient.conf C) /var/lib/dhcp3/dhclient.leases D) /run/dhclient.leases Answer: A Explanation: The DHCP client writes lease details to /var/lib/dhcp/dhclient.leases. Question 37. Which NTP daemon is the default on most modern Linux distributions? A) ntpd (from ntp package) B) chronyd (from chrony package) C) systemd-timesyncd D) All of the above can be default depending on distro Answer: D Explanation: Different distributions ship different NTP implementations; all are common. Question 38. Which HTTP header is added by Squid when it forwards a request to an origin server? A) Via B) X-Forwarded-For C) Proxy-Authorization D) Cache-Control
Answer: A Explanation: Squid adds a Via header to indicate that the request passed through a proxy. Question 39. In a high‑availability cluster using DRBD, which mode replicates data synchronously? A) Protocol A B) Protocol B C) Protocol C D) Protocol D Answer: B Explanation: DRBD Protocol B provides synchronous writes with a small write‑ahead buffer. Question 40. Which iptables table is used for NAT (Network Address Translation) rules? A) filter B) nat C) mangle D) raw Answer: B Explanation: The nat table contains POSTROUTING, PREROUTING, and OUTPUT chains for address translation. Question 41. Which firewalld zone is intended for a trusted internal network where all traffic is allowed? A) public B) dmz C) trusted
*.* @@10.0.0.5:514*.* 10.0.0.5:514D) *.* udp://10.0.0.5:514 Answer: A Explanation: A single @ indicates UDP forwarding; @@ would use TCP. Question 45. Which apt command installs the nmap package on Ubuntu? A) apt-get install nmap B) apt install nmap C) yum install nmap D) Both A and B are correct Answer: D Explanation: Both apt-get install and the newer apt install work on Ubuntu. Question 46. Which command compiles a source tarball named foo-1.2.tar.gz using the typical GNU build system? A) tar xzf foo-1.2.tar.gz && cd foo-1.2 && ./configure && make && make install B) gzip - d foo-1.2.tar.gz && tar - xvf foo-1.2.tar && ./configure && make && make install C) make foo-1.2.tar.gz D) rpm - i foo-1.2.tar.gz Answer: A Explanation: The standard sequence extracts, configures, builds, and installs. Question 47. Which Linux command displays the MAC address of interface eth0? A) ip link show eth0
B) ifconfig eth0 C) ethtool - P eth0 D) All of the above Answer: D Explanation: All three commands can reveal the hardware (MAC) address. Question 48. Which option of ip link set brings interface eth1 up? A) ip link set eth1 up B) ip link set dev eth1 up C) ip link set eth1 state up D) All of the above are valid syntaxes Answer: D Explanation: All listed variations are accepted by ip link set. Question 49. Which command displays active network sockets and the processes that own them in a tree view? A) ss - tulpn B) netstat - tulpn C) lsof - i - P - n D) ss - p - a - f inet Answer: A Explanation: ss - tulpn lists listening and established sockets with associated PIDs. Question 50. Which file stores static routes that are applied at boot on a RHEL‑based system?
A) httpd_can_network_connect B) httpd_enable_cgi C) httpd_read_user_content D) httpd_use_nfs Answer: A Explanation: httpd_can_network_connect permits Apache to initiate outbound connections. Question 54. Which option of systemctl shows the full status, including recent logs, of the sshd service? A) systemctl status sshd B) systemctl show sshd C) systemctl info sshd D) systemctl list-units sshd Answer: A Explanation: systemctl status displays unit status plus the journal tail. Question 55. Which command disables the firewalld service permanently? A) systemctl stop firewalld B) systemctl disable firewalld C) systemctl mask firewalld D) systemctl disable --now firewalld Answer: D Explanation: --now stops the service immediately and disables it from starting at boot.
Question 56. Which file contains the default DNS servers used by the resolver on most Linux distributions? A) /etc/resolv.conf B) /etc/nsswitch.conf C) /etc/hosts D) /etc/dnsmasq.conf Answer: A Explanation: /etc/resolv.conf lists nameserver IPs for the resolver. Question 57. Which command lists all IPv6 addresses assigned to interfaces? A) ip - 6 addr show B) ifconfig - a C) ip addr show D) netstat - 6 Answer: A Explanation: ip - 6 addr show filters for IPv6 address information. Question 58. Which option of scp preserves the modification times of the source files? A) -p B) -r C) -C D) -l Answer: A Explanation: -p copies the timestamps, permissions, and modes.