Welcome to Module 1 of our Linux System Administration Multiple-Choice Questions series! This module is designed as your first step into the world of Linux system administration. Here, you will encounter a range of questions that cover basic concepts and essential commands fundamental to managing Linux systems. Perfect for beginners or as a refresher for seasoned professionals, this module sets the groundwork for more advanced topics in subsequent modules.

Advertisement

Q1 What is the default port number for SSH?


Correct Answer: B
The default port number for SSH (Secure Shell) is 22.

Q2 Which command is used to display the current directory in Linux?


Correct Answer: B
The ‘pwd’ (print working directory) command is used to display the current directory in Linux.

Q3 What does the ‘chmod +x filename’ command do?


Correct Answer: A
The ‘chmod +x filename’ command adds executable permissions to the file.

Q4 Which command is used to list all files and directories, including hidden ones?


Correct Answer: A
The ‘ls -a’ command lists all files and directories in the current directory, including hidden ones.

Q5 What is the purpose of the ‘/etc/fstab’ file?


Correct Answer: C
The ‘/etc/fstab’ file contains a list of devices and their mount points.

Q6 Which command will show the system’s current IP address?


Correct Answer: A
The ‘ifconfig’ command is used to configure, control, and query TCP/IP network interface parameters.

Q7 What is the use of the ‘grep’ command?


Correct Answer: B
The ‘grep’ command is used to search for text within files.

Q8 Which directory contains the system’s log files?


Correct Answer: B
The ‘/var/log’ directory contains the system’s log files.

Q9 What does the command ‘sudo’ stand for?


Correct Answer: B
‘sudo’ stands for ‘super user do’, allowing a permitted user to execute a command as the superuser or another user.

Q10 Which file system is specifically designed for flash memory devices?


Correct Answer: D
F2FS (Flash-Friendly File System) is specifically designed for flash memory devices.

Q11 What is the command to view the content of a file?


Correct Answer: B
The ‘cat’ command is used to view the content of a file.

Q12 Which command is used to find the location of a command?


Correct Answer: D
The ‘which’ command is used to find the location of a command.

Q13 What is the significance of the ‘/home’ directory?


Correct Answer: D
The ‘/home’ directory contains the personal directories of all users.

Q14 Which command is used to display disk usage?


Correct Answer: B
The ‘df’ command is used to display disk space usage on all mounted filesystems.

Q15 What is the function of the ‘kill’ command?


Correct Answer: C
The ‘kill’ command is used to terminate processes.

Q16 What does the ‘/etc/shadow’ file contain?


Correct Answer: B
The ‘/etc/shadow’ file contains encrypted user passwords.

Q17 Which command is used to edit text files interactively?


Correct Answer: D
‘vim’ is a powerful text editor used to create and modify text files interactively.

Q18 What is the primary function of the ‘apt-get’ command?


Correct Answer: C
The ‘apt-get’ command is used for package management in Debian and Ubuntu systems.

Q19 What does the command ‘df -h’ display?


Correct Answer: A
The ‘df -h’ command displays disk free space in a human-readable format, with sizes in KB, MB, or GB.

Q20 Which file contains the system’s DNS settings?


Correct Answer: A
The ‘/etc/resolv.conf’ file contains the system’s DNS settings.

Q21 What is the purpose of the ‘crontab’ command?


Correct Answer: A
The ‘crontab’ command is used for scheduling commands to run at periodic intervals.

Q22 Which directory is intended for temporary files in Linux?


Correct Answer: A
The ‘/tmp’ directory is intended for storing temporary files.

Q23 What is the primary purpose of the ‘top’ command?


Correct Answer: B
The ‘top’ command is used for displaying real-time information about system processes.

Q24 Which command will display all currently running processes?


Correct Answer: A
The ‘ps -ef’ command displays a list of all currently running processes.

Q25 What is the purpose of the ‘/var’ directory?


Correct Answer: A
The ‘/var’ directory is used for storing variable data files, such as logs, databases, and email queues.

Q26 Which file defines the system’s locale settings?


Correct Answer: A
The ‘/etc/locale.conf’ file defines the system’s locale settings.

Q27 What does the ‘ln’ command do in Linux?


Correct Answer: C
The ‘ln’ command is used to create links to files and directories.

Q28 What is the use of the ‘tar’ command?


Correct Answer: C
The ‘tar’ command is used for archiving files.

Q29 Which command is used to change file ownership?


Correct Answer: A
The ‘chown’ command is used to change the ownership of a file or directory.

Q30 What does the ‘ping’ command do?


Correct Answer: B
The ‘ping’ command sends ICMP echo requests to a host to measure the reachability and round-trip time.

Q31 Which directory is the root of the file system hierarchy?


Correct Answer: B
The ‘/’ directory is the root of the file system hierarchy in Linux.

Q32 What does the command ‘useradd’ do?


Correct Answer: B
The ‘useradd’ command is used to add a new user to the system.

Q33 What is the purpose of the ‘/boot’ directory?


Correct Answer: B
The ‘/boot’ directory holds the system boot files, including the Linux kernel.

Q34 Which command will display the kernel version?


Correct Answer: A
The ‘uname -r’ command displays the kernel version.

Q35 What is the function of the ‘iptables’ command?


Correct Answer: B
The ‘iptables’ command is used for network firewall configuration.

Q36 Which command is used to monitor real-time network traffic?


Correct Answer: C
The ‘tcpdump’ command is used to monitor real-time network traffic.

Q37 What does the ‘/etc/passwd’ file contain?


Correct Answer: B
The ‘/etc/passwd’ file contains user account information.

Q38 What is the command to update all packages on a Debian-based system?


Correct Answer: B
The ‘apt-get upgrade’ command is used to update all packages on a Debian-based system.

Q39 Which command displays the amount of memory used and available on the system?


Correct Answer: B
The ‘free’ command displays the total amount of free and used physical and swap memory in the system.

Q40 What is the purpose of the ‘/etc/hostname’ file?


Correct Answer: C
The ‘/etc/hostname’ file contains the system’s host name.

Q41 Which command is used to compress files using gzip compression?


Correct Answer: C
The ‘gzip’ command is used to compress files using gzip compression.

Q42 What does the ‘ifup’ command do?


Correct Answer: B
The ‘ifup’ command is used to bring a network interface up.

Q43 Which command lists all installed packages in Debian-based systems?


Correct Answer: B
The ‘dpkg -l’ command lists all installed packages in Debian-based systems.

Q44 What is the primary function of the ‘/proc’ directory?


Correct Answer: A
The ‘/proc’ directory is a virtual filesystem that contains information about system processes and other system information.

Q45 Which command will forcefully unmount a filesystem?


Correct Answer: A
The ‘umount -f’ command forcefully unmounts a filesystem.

Q46 What is the function of the ‘lsblk’ command?


Correct Answer: A
The ‘lsblk’ command lists information about all available or the specified block devices.

Q47 What does the ‘systemctl’ command manage?


Correct Answer: B
The ‘systemctl’ command is used to examine and control the systemd system and service manager.

Q48 Which command is used to update the package list in Debian-based systems?


Correct Answer: A
The ‘apt-get update’ command is used to update the package list in Debian-based systems.

Q49 What does the ‘man’ command do?


Correct Answer: B
The ‘man’ command displays the manual pages for commands, providing detailed documentation.

Q50 What is the significance of the ‘/etc’ directory?


Correct Answer: C
The ‘/etc’ directory holds configuration files for the system and applications.

Q51 Which command can be used to view the end of a file?


Correct Answer: C
The ‘tail’ command is used to view the end of a file, and it’s especially useful for monitoring log files.

Q52 What is the purpose of the ‘wget’ command?


Correct Answer: B
The ‘wget’ command is used for downloading files from the internet, supporting HTTP, HTTPS, and FTP protocols.

Q53 Which directory contains the executable files for installed programs?


Correct Answer: C
The ‘/bin’ directory contains the executable files for user commands and essential programs.

Q54 What is the command to search for a specific package in Debian-based systems?


Correct Answer: A
The ‘apt-cache search’ command is used to search for a specific package in the package cache of Debian-based systems.

Q55 What does the ‘iptables -L’ command do?


Correct Answer: D
The ‘iptables -L’ command lists all current iptables firewall rules.

Q56 Which command is used to add a user to a group?


Correct Answer: A
The ‘usermod -aG’ command is used to add a user to a supplementary group.

Q57 What is the main purpose of the ‘rsync’ command?


Correct Answer: A
The ‘rsync’ command is used for remote file synchronization, efficiently copying and syncing files either between local directories or between a local and a remote system.

Q58 What does the ‘/dev’ directory contain?


Correct Answer: B
The ‘/dev’ directory contains device files that represent hardware components.

Q59 Which command is used to display the routing table?


Correct Answer: C
The ‘ip route show’ command is used to display the routing table.

Q60 What does the ‘nohup’ command do?


Correct Answer: C
The ‘nohup’ command is used to run a command immune to hangups, with output to a non-tty.

Q61 Which command is used to display available disk space on file systems in a human-readable format?


Correct Answer: B
The ‘df -h’ command displays available disk space on mounted file systems in a human-readable format.

Q62 What does the command ‘history’ do?


Correct Answer: A
The ‘history’ command displays the command line history, allowing users to see the commands that have been entered previously.

Q63 What is the main use of the ‘ssh-keygen’ command?


Correct Answer: B
The ‘ssh-keygen’ command is used for generating SSH authentication keys, allowing secure remote login without passwords.

Q64 What does the ‘mount’ command do?


Correct Answer: A
The ‘mount’ command is used to mount a storage device or filesystem, making it accessible and attaching it to an existing directory structure.

Q65 Which file contains local DNS entries for hostname resolution?


Correct Answer: C
The ‘/etc/hosts’ file contains local DNS entries for hostname resolution, mapping hostnames to IP addresses.

Q66 What is the command to change the priority of a running process?


Correct Answer: D
The ‘renice’ command is used to change the priority of a running process.

Q67 Which command is used to check filesystem integrity?


Correct Answer: A
The ‘fsck’ command is used to check and optionally repair one or more Linux filesystems.

Q68 What does the ‘alias’ command do?


Correct Answer: B
The ‘alias’ command is used to create a shortcut for a command, allowing a user to invoke longer commands using shorter and simpler aliases.

Q69 What is the purpose of the ‘dd’ command?


Correct Answer: A
The ‘dd’ command is used for disk duplication and conversion, allowing for copying and converting data between files, devices, and partitions.

Q70 Which command is used to display all active network interfaces?


Correct Answer: C
The ‘ip addr show’ command is used to display all active network interfaces, including detailed information about each.

Q71 What does the ‘jobs’ command do?


Correct Answer: A
The ‘jobs’ command lists the jobs that are currently running or stopped in the background.

Q72 What is the command to display the current system date and time?


Correct Answer: A
The ‘date’ command is used to display the current system date and time.

You have now completed Module 1 of the Linux System Administration MCQ series. To continue building on this foundation and delve into intermediate topics, please proceed to Linux System Admin MCQ Module 2.

Share.
Leave A Reply


Exit mobile version