












































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The Linux Exam assesses practical skills in Linux system administration and command-line operations. Topics include file systems, permissions, process management, networking, package management, shell scripting, and system security. Candidates demonstrate the ability to manage, configure, and troubleshoot Linux-based systems in enterprise environments.
Typology: Exams
1 / 84
This page cannot be seen from the preview
Don't miss anything!













































































Question 1. Which organization originally released the Linux kernel under the GPL license? A) Apache Software Foundation B) Free Software Foundation C) Linux Foundation D) OpenBSD Project Answer: B Explanation: The Free Software Foundation (FSF) promotes the GNU General Public License (GPL), under which Linus Torvalds released the Linux kernel. Question 2. Which of the following file systems is a copy‑on‑write (COW) system native to Linux? A) ext B) XFS C) Btrfs D) ReiserFS Answer: C Explanation: Btrfs (B‑Tree File System) implements copy‑on‑write, allowing snapshots and checksumming. Question 3. In the boot process, which component is responsible for loading the kernel image into memory? A) BIOS/UEFI B) GRUB C) initrd D) systemd Answer: B
Explanation: GRUB2 (the bootloader) loads the kernel and initramfs into RAM and passes control to the kernel. Question 4. Which command displays the current runlevel when using SysVinit? A) systemctl list-units --type=target B) runlevel C) whoami D) uptime Answer: B Explanation: The runlevel command prints the previous and current runlevels under SysVinit. Question 5. Which partition table scheme allows more than four primary partitions on a modern disk? A) MBR B) GPT C) DOS D) BSD Answer: B Explanation: GUID Partition Table (GPT) supports up to 128 primary partitions on a disk. Question 6. Which package manager is native to Red Hat Enterprise Linux 8 and later? A) yum B) dnf C) apt-get D) pacman Answer: B Explanation: dnf (Dandified YUM) replaced yum as the default package manager in RHEL 8.
A) All processes owned by root B) All processes containing “httpd” in their command line C) Only the HTTP daemon status D) Disk usage of the httpd directory Answer: B Explanation: ps aux lists all processes; piping to grep httpd filters those with “httpd”. Question 11. Which editor mode allows you to insert text at the current cursor position without leaving command mode? A) Insert mode in vim (i) B) Command mode in vim (:) C) Visual mode in vim (v) D) Ex mode in vim (Q) Answer: A Explanation: Pressing i in vim switches to Insert mode, allowing direct text entry. Question 12. Which directory, according to the Filesystem Hierarchy Standard, contains system configuration files? A) /usr/bin B) /var/log C) /etc D) /home Answer: C Explanation: /etc stores host‑specific configuration files. Question 13. Which command creates a new physical volume for LVM? A) pvcreate /dev/sdb
B) vgcreate myvg /dev/sdb C) lvcreate - n mylv - L 10G myvg D) lvm init /dev/sdb Answer: A Explanation: pvcreate initializes a block device as a Physical Volume for LVM. Question 14. To mount a filesystem defined in /etc/fstab without rebooting, which option is appropriate? A) mount - a B) mount --all C) systemctl mount-fstab D) fstab - r Answer: A Explanation: mount - a reads /etc/fstab and mounts all filesystems not currently mounted. Question 15. Which command sets a user’s default login shell to /bin/bash? A) usermod - s /bin/bash username B) chsh - s /bin/bash username C) passwd - s /bin/bash username D) loginctl set-shell /bin/bash username Answer: A Explanation: usermod - s changes the login shell for the specified user. Question 16. Which cron syntax field represents the day of the month? A) First field B) Second field
B) ip addr show dev eth C) ip link list eth D) netstat - i eth Answer: B Explanation: ip addr show dev eth0 displays address information for the specified interface. Question 20. Which file contains static DNS resolver configuration for most Linux distributions? A) /etc/hosts B) /etc/resolv.conf C) /etc/nsswitch.conf D) /etc/dnsmasq.conf Answer: B Explanation: /etc/resolv.conf lists nameserver IPs used by the resolver library. Question 21. Which SSH configuration directive disables password authentication? A) PermitRootLogin no B) PasswordAuthentication no C) AllowUsers no D) UsePAM no Answer: B Explanation: Setting PasswordAuthentication no forces key‑based authentication. Question 22. What does the SUID bit on an executable allow? A) Execution with the file owner’s privileges B) Execution with the group’s privileges
C) Execution with no privileges D) Execution only by root Answer: A Explanation: SUID (Set User ID) runs the program with the UID of the file owner, often root. Question 23. Which firewall tool is the default on Ubuntu Server? A) firewalld B) iptables‑legacy C) ufw D) nftables Answer: C Explanation: Ubuntu ships with Uncomplicated Firewall (ufw) as the front‑end for iptables. Question 24. In SELinux, which mode logs policy violations but does not enforce them? A) Enforcing B) Permissive C) Disabled D) Targeted Answer: B Explanation: Permissive mode records AVCs in the audit log while allowing the actions. Question 25. Which command lists all open network sockets and the processes that own them? A) netstat - tulnp B) ss - tulnp C) lsof - i
Answer: C Explanation: PATH holds a colon‑separated list of directories that the shell searches for commands. Question 29. Which command displays the current runlevel when using systemd? A) runlevel B) systemctl get-default C) who - r D) uname - r Answer: B Explanation: systemctl get-default shows the default target, which replaces the traditional runlevel concept. Question 30. Which Linux distribution is the upstream source for Red Hat Enterprise Linux? A) Debian B) Fedora C) openSUSE D) Arch Linux Answer: B Explanation: Fedora serves as the upstream community distribution for RHEL. Question 31. Which file stores the list of enabled systemd services for the default target? A) /etc/systemd/system/default.target.wants/ B) /etc/init.d/ C) /etc/rc.d/rc3.d/ D) /var/lib/systemd/units/ Answer: A
Explanation: Systemd creates symlinks in the default.target.wants directory for enabled units. Question 32. Which command creates a new logical volume of size 5 GB named lvdata in volume group vgdata? A) lvcreate - L 5G - n lvdata vgdata B) vgcreate - L 5G - n lvdata vgdata C) pvcreate - L 5G - n lvdata vgdata D) lvadd - size 5G - name lvdata vgdata Answer: A Explanation: lvcreate - L 5G - n lvdata vgdata creates a 5 GB LV named lvdata. Question 33. Which option to the mount command mounts a filesystem read‑only? A) - r B) - o ro C) - readonly D) - s ro Answer: B Explanation: -o ro specifies the mount option “read‑only”. Question 34. Which command displays the current disk usage of each mounted filesystem? A) df - h B) du - sh * C) lsblk - f D) fdisk - l Answer: A Explanation: df - h reports the size, used, and available space of each mounted filesystem in human‑readable form.
Question 38. Which command creates a new user named bob without a home directory? A) useradd - M bob B) adduser --no-create-home bob C) useradd - d /dev/null bob D) Both A and B are correct Answer: D Explanation: useradd - M and adduser --no-create-home both prevent creation of a home directory. Question 39. Which of the following is the correct syntax to schedule a one‑time job at 02: tomorrow using at? A) echo "command" | at 02:30 tomorrow B) at 02:30 tomorrow - c "command" C) at - t 0230 tomorrow "command" D) schedule at 02:30 tomorrow "command" Answer: A Explanation: Piping the command into at with the desired time schedules it. Question 40. Which file stores persistent journald logs on a system using systemd? A) /var/log/journal/ B) /etc/systemd/journal.conf C) /run/journal/ D) /var/log/syslog Answer: A Explanation: When /var/log/journal/ exists, journald stores logs persistently there.
Question 41. Which command displays the current SELinux mode? A) getenforce B) selinuxstatus C) sestatus - m D) seinfo - mode Answer: A Explanation: getenforce prints “Enforcing”, “Permissive”, or “Disabled”. Question 42. Which of the following is a valid IPv6 address? A) 2001:0db8:85a3::8a2e:0370: B) 192.168.1.1/ C) fe80::1ff:fe23:4567:890a/ D) Both A and C are correct Answer: D Explanation: Both A and C follow IPv6 notation; C includes a subnet prefix. Question 43. Which command shows the routing table of the host? A) route - n B) ip route show C) netstat - r D) All of the above Answer: D Explanation: route - n, ip route show, and netstat - r all display routing information. Question 44. Which command is used to change the ownership of a file to user root and group admin?
C) /etc/bashrc D) /etc/default/umask Answer: B Explanation: umask is set in /etc/login.defs (or sometimes in /etc/profile), but the primary definition is in login.defs. Question 48. Which command shows the current memory usage in a human‑readable format? A) free - h B) top - m C) vmstat - s D) cat /proc/meminfo Answer: A Explanation: free - h displays total, used, and free memory with size units. Question 49. Which of the following statements about the /proc filesystem is true? A) It is a virtual filesystem that provides process and kernel information. B) It resides on disk and must be mounted manually each boot. C) It contains user home directories. D) It stores compiled binaries. Answer: A Explanation: /proc is a pseudo‑filesystem exposing kernel and process data. Question 50. Which command is used to change the priority of a running process to a higher nice value? A) renice +5 - p 1234 B) nice - n +5 command
C) renice - n +5 1234 D) Both A and C are correct Answer: D Explanation: renice +5 - p 1234 and renice - n +5 1234 both increase the nice value (lower priority). Question 51. Which of the following is the correct way to compile a C program named prog.c using gcc and produce an executable named prog? A) gcc prog.c - o prog B) gcc - c prog.c - o prog C) gcc prog.c prog D) gcc - link prog.c - o prog Answer: A Explanation: gcc prog.c - o prog compiles and links the source into the executable prog. Question 52. Which command displays the current system’s hostname? A) hostnamectl B) uname - n C) cat /etc/hostname D) All of the above Answer: D Explanation: All three commands can show the hostname. Question 53. Which option to the mount command automatically mounts a filesystem at boot time? A) --auto B) - a
Answer: A Explanation: lsmod reads /proc/modules and displays loaded modules. Question 57. Which of the following is the default runlevel (target) for a graphical desktop on a system using systemd? A) multi-user.target B) graphical.target C) rescue.target D) poweroff.target Answer: B Explanation: graphical.target brings up the display manager and GUI. Question 58. Which flag to the tar command creates a compressed gzip archive? A) - z B) - j C) - J D) - c Answer: A Explanation: -z tells tar to filter the archive through gzip. Question 59. Which command displays the current kernel version? A) uname - r B) cat /proc/version C) dmesg | grep Linux D) All of the above Answer: D
Explanation: All three methods provide the kernel version. Question 60. Which of the following is a secure way to store passwords for automated scripts? A) Hard‑code them in the script file. B) Use a plain‑text file with 600 permissions. C) Store them in a keyring or use ssh‑agent. D) Echo them on the command line. Answer: C Explanation: Using a keyring, secret‑store, or ssh‑agent avoids exposing passwords. Question 61. Which command creates a compressed bzip2 tar archive named backup.tar.bz from /etc directory? A) tar - cjf backup.tar.bz2 /etc B) tar - czf backup.tar.bz2 /etc C) tar - cjf /etc backup.tar.bz D) tar - cvf backup.tar.bz2 /etc Answer: A Explanation: -j selects bzip2 compression; -c creates the archive. Question 62. Which file contains the mapping of IP addresses to hostnames for local resolution? A) /etc/hosts B) /etc/resolv.conf C) /etc/nsswitch.conf D) /etc/hostname Answer: A