




























































































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 bootloader is most commonly used to configure and manage the initial boot process in Linux systems? A) LILO B) GRUB C) Syslinux D) UEFI Answer: B) GRUB Explanation: GRUB (GRand Unified Bootloader) is the most widely used bootloader in Linux systems, providing flexible configuration options and supporting multiple operating systems. LILO is older and less common today, while UEFI is firmware, not a bootloader. Question 2. In systemd, which target is equivalent to traditional runlevel 3, providing a multi-user, non-graphical environment? A) graphical.target B) rescue.target C) multi-user.target D) reboot.target Answer: C) multi-user.target Explanation: multi-user.target in systemd corresponds to runlevel 3, providing a multi-user command-line environment without graphical interface.
Question 3. Which command is used to list all currently loaded kernel modules? A) lsmod B) modinfo C) insmod D) modprobe Answer: A) lsmod Explanation: lsmod displays all currently loaded kernel modules, helping in troubleshooting kernel module issues. Question 4. How can you remove a kernel module that is currently loaded? A) insmod B) modprobe - r C) rmmod D) Both B and C Answer: D) Both B and C Explanation: Both 'modprobe - r' and 'rmmod' can remove loaded modules. 'modprobe - r' also handles dependencies, whereas 'rmmod' removes modules directly. Question 5. Which package manager is primarily used in Debian-based distributions? A) yum
C) Configuring network interfaces D) Editing configuration files Answer: B) Managing packages and repositories in RPM-based systems Explanation: 'yum' and its successor 'dnf' are package managers for RPM-based distributions like CentOS and Fedora, used for installing, updating, and removing software packages. Question 8. Which command is used to update the system packages automatically on a systemd-based Linux system? A) systemctl update B) apt update C) dnf update D) systemctl upgrade Answer: C) dnf update Explanation: 'dnf update' is used on Fedora-based systems to refresh repositories and upgrade installed packages; 'apt update' refreshes package lists but requires 'apt upgrade' for upgrades. Question 9. Which systemd command is used to enable a service to start automatically at boot? A) systemctl start B) systemctl enable
C) systemctl restart D) systemctl disable Answer: B) systemctl enable Explanation: 'systemctl enable' configures a service to start automatically during system boot by creating the appropriate symlinks. Question 10. Which tool provides real-time monitoring of system processes, including CPU and memory usage? A) ps B) top C) lsof D) journalctl Answer: B) top Explanation: 'top' displays real-time system process information, including resource usage, making it useful for monitoring system performance. Question 11. How do you view system logs for troubleshooting with systemd? A) journalctl B) syslog C) tail /var/log/messages D) dmesg
Explanation: SSH (Secure Shell) provides encrypted remote login and command execution, ensuring secure communication over the network. Question 14. Which command displays detailed information about network sockets and listening ports? A) netstat B) ss C) traceroute D) ifconfig Answer: B) ss Explanation: 'ss' replaces 'netstat' and shows socket statistics, including listening and established connections with more detailed information. Question 15. Which Linux storage utility is used to create, manage, and monitor software RAID arrays? A) fdisk B) mdadm C) partprobe D) lvcreate Answer: B) mdadm Explanation: 'mdadm' manages software RAID arrays in Linux, allowing creation, monitoring, and maintenance of RAID configurations.
Question 16. Which RAID level provides striping with no redundancy, maximizing performance but offering no fault tolerance? A) RAID 0 B) RAID 1 C) RAID 5 D) RAID 10 Answer: A) RAID 0 Explanation: RAID 0 stripes data across multiple disks for performance but does not provide redundancy; failure of any disk results in data loss. Question 17. How do you enable disk quotas for a specific filesystem? A) mount - o quota B) quotaon C) setquota D) Both B and C Answer: D) Both B and C Explanation: 'quotaon' activates quotas on a filesystem, and 'setquota' sets quotas for individual users or groups. Question 18. Which command is used to back up files and directories efficiently by copying only changed parts?
D) /etc/group Answer: C) /etc/sudoers Explanation: The '/etc/sudoers' file defines user privileges and permissions for executing commands as root or other users. Question 21. Which command is used to write and debug bash scripts involving loops and conditionals? A) bash B) sh C) echo D) The script language itself; bash scripting is written in bash syntax Answer: D) The script language itself; bash scripting is written in bash syntax Explanation: Bash scripts are written in bash syntax; the 'bash' command executes the scripts, but writing involves scripting language syntax. Question 22. Which utility schedules tasks to run periodically based on a crontab schedule? A) at B) cron C) systemd timers D) Both B and C Answer: D) Both B and C
Explanation: 'cron' uses crontab files for scheduled tasks, while systemd timers provide an alternative scheduling method. Question 23. Which configuration management tool is primarily used to automate infrastructure deployment through playbooks? A) Puppet B) Chef C) Ansible D) Salt Answer: C) Ansible Explanation: Ansible uses YAML-based playbooks to automate configuration and deployment across multiple systems in a simple, agentless manner. Question 24. Which hypervisor technology is used to create and manage virtual machines on Linux? A) VirtualBox B) KVM C) VMware D) Hyper-V Answer: B) KVM Explanation: KVM (Kernel-based Virtual Machine) is a Linux hypervisor that allows creation and management of virtual machines directly within the Linux kernel.
A) Amazon S B) AWS EC C) Google Cloud Storage D) Azure Blob Storage Answer: B) AWS EC Explanation: Amazon EC2 provides scalable virtual machine instances in the cloud, allowing dynamic provisioning and management. Question 28. When diagnosing hardware issues, which kernel message buffer command provides recent kernel logs? A) dmesg B) journalctl C) tail /var/log/messages D) systemctl status Answer: A) dmesg Explanation: 'dmesg' displays kernel ring buffer messages, useful for hardware diagnostics and boot issues. Question 29. Which command is used to recover a Linux system from a live CD/USB environment? A) chroot B) fdisk
C) grub-install D) mount Answer: A) chroot Explanation: 'chroot' changes the root directory to the mounted system, enabling repair and recovery procedures. Question 30. Which component manages the boot process in modern Linux systems using systemd? A) init B) systemd-boot C) systemd D) udev Answer: C) systemd Explanation: 'systemd' is the init system that manages the boot process in many modern Linux distributions, replacing traditional init. Question 31. Which command is used to list all PCI devices detected by the system? A) lsusb B) lspci C) lshw D) hwinfo
Question 34. To load a kernel module manually, which command is used? A) insmod B) modprobe C) rmmod D) unload Answer: A) insmod Explanation: 'insmod' inserts a kernel module directly into the kernel, requiring the full path to the module file. Question 35. Which command is preferred for inserting kernel modules because it handles dependencies automatically? A) insmod B) modprobe C) rmmod D) modinfo Answer: B) modprobe Explanation: 'modprobe' loads modules and automatically resolves dependencies, making it safer and more convenient than 'insmod'. Question 36. When compiling a custom kernel, which configuration file is used to specify hardware and feature options?
A) /boot/config-$(uname - r) B) /etc/kconfig C) /usr/src/linux/.config D) /etc/kernel.conf Answer: C) /usr/src/linux/.config Explanation: The '.config' file in the kernel source directory specifies build options, including hardware support. Question 37. Which command installs a package in a Debian-based system? A) rpm - i B) apt install C) yum install D) pacman - S Answer: B) apt install Explanation: 'apt install' is used in Debian and Ubuntu systems to install packages from repositories. Question 38. How do you remove a package in RPM-based distributions? A) apt remove B) rpm - e C) yum remove
Explanation: 'systemctl reload' sends a signal to the service to reload its configuration without stopping the process, if supported. Question 41. How can you list all active systemd services? A) systemctl list-units --type=service B) systemctl status C) systemctl list-services D) systemctl show Answer: A) systemctl list-units --type=service Explanation: This command lists all currently active service units in systemd. Question 42. Which process management command shows the parent process ID (PPID) of a given process? A) ps B) top C) pgrep D) ppid Answer: A) ps Explanation: 'ps' can display PPID using options like 'ps - o ppid='. Question 43. To manually send a signal to a process, which command is used?
A) kill B) signal C) send D) processctl Answer: A) kill Explanation: 'kill' sends signals (e.g., SIGTERM, SIGKILL) to processes based on process ID. Question 44. Which command is used to filter logs in journalctl for a specific service? A) journalctl --unit=service_name B) journalctl --service=service_name C) journalctl --filter=service_name D) journalctl - s service_name Answer: A) journalctl --unit=service_name Explanation: '--unit=' filters journal logs for a specific systemd service. Question 45. Which command is used to configure a network interface to use DHCP via nmcli? A) nmcli con add B) nmcli con modify