




























































































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 command displays the current runlevel of a Linux system? A) runlevel B) level C) systemctl status D) reboot Answer: A Explanation: The runlevel command shows the current and previous runlevels of the system, which are used to define system states in traditional SysV init systems. Question 2. What is the primary function of the Linux kernel? A) Managing user accounts B) Handling hardware and system resources C) Providing a graphical user interface D) Compiling software Answer: B Explanation: The Linux kernel is responsible for managing hardware resources and providing essential services to the system and applications.
Question 3. Which command is used to list all files, including hidden ones, in a directory? A) ls B) ls - a C) list - h D) showfiles Answer: B Explanation: The ls - a command lists all files in a directory, including those that start with a dot, which are hidden by default. Question 4. What does the chmod 755 filename command do? A) Grants read, write, and execute to everyone B) Sets owner to full access, group and others to read and execute C) Removes write permissions for the owner D) Sets all permissions to none Answer: B Explanation: chmod 755 means owner gets full (rwx), while group and others get read and execute (r-x).
Question 7. What is the purpose of the sticky bit on a directory? A) Allows only the owner to delete or rename files within the directory B) Grants execute permission to all users C) Prevents any changes to files D) Hides files from users Answer: A Explanation: The sticky bit ensures that only file owners (or root) can delete or rename files in the directory, commonly used on /tmp. Question 8. Which command is used to display running processes? A) top B) grep C) df D) chmod Answer: A Explanation: The top command displays running processes and system resource usage in real time. Question 9. What file system is known for supporting journaling and large volumes on Linux?
A) ext B) ext C) FAT D) NTFS Answer: B Explanation: ext4 is a widely used Linux file system that supports journaling and large volume sizes. Question 10. Which tool is used to manage Logical Volume Manager (LVM) physical volumes? A) pvcreate B) lvcreate C) vgcreate D) mkfs Answer: A Explanation: pvcreate initializes a physical disk or partition for use by LVM as a physical volume. Question 11. Which command shows information about mounted file systems?
Answer: C Explanation: RAID 5 stripes data across disks with parity, offering both redundancy and improved read performance. Question 14. What is the default text editor for many Linux distributions? A) nano B) vim C) emacs D) gedit Answer: B Explanation: vim is the default text editor in many Linux distributions, especially on servers. Question 15. Which command is used to change the owner of a file? A) chmod B) chown
C) chgrp D) touch Answer: B Explanation: chown changes the owner (and optionally the group) of a file or directory. Question 16. What is the purpose of the /etc/fstab file? A) Stores user passwords B) Lists mounted file systems and their mount options C) Records system logs D) Manages network interfaces Answer: B Explanation: /etc/fstab contains static information about filesystems and their mount points and options. Question 17. Which command is used to monitor real-time logs from systemdโs journal? A) dmesg B) journalctl - f C) tail - f /var/log/syslog
Answer: A Explanation: shutdown - h now initiates an immediate shutdown and halts the system. Question 20. What does the command ln - s /etc/nginx/nginx.conf /tmp/nginx.conf create? A) A hard link B) A symbolic link C) A backup copy D) A new file Answer: B Explanation: ln - s creates a symbolic (soft) link, in this case pointing /tmp/nginx.conf to /etc/nginx/nginx.conf. Question 21. Which of the following commands is used to display disk usage statistics of directories and files? A) du B) df C) ls D) stat
Answer: A Explanation: du (disk usage) summarizes disk usage for files and directories. Question 22. How can you recursively copy a directory and its contents? A) cp dir1 dir B) cp - r dir1 dir C) mv dir1 dir D) copy dir1 dir Answer: B Explanation: cp - r copies directories and their contents recursively. Question 23. Which command is used to search for a string within files? A) find B) grep C) awk D) sed Answer: B
Question 26. Which command displays all network interfaces and their status? A) ip link B) ifconfig C) netstat D) showif Answer: A Explanation: ip link shows all network interfaces and their states; ifconfig is deprecated in many systems. Question 27. How do you display routing table information? A) route B) ip route C) netstat - r D) All of the above Answer: D Explanation: All provided commands can display routing table information, though ip route is the modern replacement.
Question 28. Which file contains the static IP configuration for a network interface on most modern Linux systems? A) /etc/network/interfaces B) /etc/sysconfig/network-scripts/ifcfg-eth C) /etc/netplan/*.yaml D) All of the above Answer: D Explanation: Different distributions use different files for static IP configuration; all listed are valid in certain distros. Question 29. What is the function of DNS? A) Translate IP addresses to MAC addresses B) Convert hostnames to IP addresses C) Assign IP addresses automatically D) Secure network traffic Answer: B Explanation: DNS (Domain Name System) translates human-readable hostnames into IP addresses. Question 30. How do you check if a remote host is reachable?
B) scp C) ftp D) rsync Answer: B Explanation: scp (secure copy) is used to securely transfer files between hosts over SSH. Question 33. What is the primary function of rsync? A) Synchronize files/directories locally or remotely B) Compress files C) Encrypt network traffic D) Manage disk quotas Answer: A Explanation: rsync is a versatile tool for synchronizing files and directories locally or remotely. Question 34. Which package manager is used by Ubuntu and Debian systems? A) yum B) dnf
C) apt D) zypper Answer: C Explanation: apt is the package manager for Debian, Ubuntu, and related distributions. Question 35. What does the command apt update do? A) Installs new software B) Updates package lists from repositories C) Upgrades all installed packages D) Removes unused packages Answer: B Explanation: apt update refreshes the package index to know about the latest available packages. Question 36. Which command upgrades all installed packages on a Debian-based system? A) apt-get update B) apt upgrade C) apt remove
D) dnf packages Answer: B Explanation: dnf list installed lists all installed packages on Fedora, RHEL, and CentOS systems using DNF. Question 39. What is the purpose of compiling software from source? A) To remove software B) To customize and optimize software for your system C) To download prebuilt binaries D) To update the kernel automatically Answer: B Explanation: Compiling from source allows customization and optimization for specific system requirements. Question 40. Which file stores local user account information? A) /etc/shadow B) /etc/passwd C) /etc/sudoers D) /etc/group
Answer: B Explanation: /etc/passwd contains basic user account information such as username, UID, GID, home directory, and shell. Question 41. What does the /etc/shadow file store? A) User account information B) Encrypted user passwords and password aging information C) Group information D) Network configuration Answer: B Explanation: /etc/shadow stores hashed user passwords and information related to password expiration. Question 42. Which command adds a new user account? A) usermod B) adduser C) passwd D) edituser Answer: B