LX0-103: CompTIA Linux+ Certification Test! Trivia Questions Quiz

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Catherine Halcomb
C
Catherine Halcomb
Community Contributor
Quizzes Created: 1428 | Total Attempts: 5,932,599
Questions: 120 | Attempts: 150

SettingsSettingsSettings
LX0-103: CompTIA Linux+ Certification Test! Trivia Questions Quiz - Quiz

Are you looking for a trivia questions quiz to help you with the Lx0-103: CompTIA Linux+ Certification Test? Every time you get a certificate you have three years till you take the next exam so it is very important to ensure that you are up to date with changes in the information sector. How about you give it a shot and get the well-deserved revision. All the best!


Questions and Answers
  • 1. 

    Which SysV init configuration file should be modified to disable the ctrl-Alt-delete key combination?

    • A.

      /proc/keys

    • B.

      /etc/inittab

    • C.

      /proc/inittab

    • D.

      /etc/reboot

    • E.

      /etc/keys

    Correct Answer
    B. /etc/inittab
    Explanation
    The correct answer is /etc/inittab. This file is used by the SysV init system to configure the initialization of the system. By modifying this file, you can disable the ctrl-Alt-delete key combination, which is typically used to initiate a system reboot.

    Rate this question:

  • 2. 

    During a system boot cycle, what program is executed after the BIOS completes its tasks?

    • A.

      The init program

    • B.

      The kernel

    • C.

      The inetd program

    • D.

      The bootloader

    Correct Answer
    D. The bootloader
    Explanation
    After the BIOS completes its tasks during a system boot cycle, the bootloader program is executed. The bootloader is responsible for loading the operating system into memory and initiating its execution. It is typically stored in a specific location on the computer's hard drive or in a separate boot partition. The bootloader plays a crucial role in the boot process by locating the operating system files and transferring control to the kernel, which is the core of the operating system.

    Rate this question:

  • 3. 

    Which run levels should never be declared as the default run level when using SysV init? (Choose TWO correct answers.)

    • A.

      1

    • B.

      3

    • C.

      5

    • D.

      6

    • E.

      0

    Correct Answer(s)
    D. 6
    E. 0
    Explanation
    Run levels 6 and 0 should never be declared as the default run level when using SysV init. Run level 6 is used for system reboot, so setting it as the default run level can cause unintended reboots. Run level 0 is used for system shutdown, so setting it as the default run level can result in accidental shutdowns. It is recommended to set the default run level to a non-shutdown or non-reboot run level, such as run level 3 or 5, depending on the specific requirements of the system.

    Rate this question:

  • 4. 

    Which of the following statements is correct when talking about /proc/?

    • A.

      All changes to files in /proc/ are stored in /etc/proc.d/ and restored on reboot.

    • B.

      All files within /proc/ are only readable by the root user.

    • C.

      All files within /proc/ are read-only and their contents cannot be changed.

    • D.

      All changes to files in /proc/ are immediately recognized by the kernel.

    Correct Answer
    D. All changes to files in /proc/ are immediately recognized by the kernel.
    Explanation
    The correct answer is that all changes to files in /proc/ are immediately recognized by the kernel. The /proc/ directory is a virtual file system that provides information about processes and system resources. It allows processes to communicate with the kernel by reading from and writing to specific files in the /proc/ directory. Any changes made to these files are immediately recognized by the kernel, allowing for dynamic adjustments and monitoring of system parameters.

    Rate this question:

  • 5. 

    What of the following statements are true regarding /dev/ when using udev? (Choose TWO correct answers.)

    • A.

      Entries for all possible devices get created on boot even if those devices are not connected.

    • B.

      Additional rules for udev can be created by adding them to /etc/udev/rules.d/.

    • C.

      When using udev, it is not possible to create block or character devices in /dev/ using mknod.

    • D.

      The /dev/ directory is a filesystem of type tmpfs and is mounted by udev during system startup.

    • E.

      The content of /dev/ is stored in /etc/udev/dev and is restored during system startup.

    Correct Answer(s)
    B. Additional rules for udev can be created by adding them to /etc/udev/rules.d/.
    D. The /dev/ directory is a filesystem of type tmpfs and is mounted by udev during system startup.
    Explanation
    When using udev, additional rules can be created by adding them to the /etc/udev/rules.d/ directory. This allows for customization and specific configurations for devices. Additionally, the /dev/ directory is a filesystem of type tmpfs, which means it is stored in memory and not on a physical disk. It is mounted by udev during system startup to provide access to device files.

    Rate this question:

  • 6. 

    Which of the following information is stored within the BIOS? (Choose TWO correct answers.)

    • A.

      Boot device order

    • B.

      Linux kernel version

    • C.

      Timezone

    • D.

      Hardware configuration

    • E.

      The system’s hostname

    Correct Answer(s)
    A. Boot device order
    D. Hardware configuration
    Explanation
    The BIOS (Basic Input/Output System) is responsible for initializing and controlling hardware during the boot process. It stores information about the boot device order, which determines the sequence in which the computer looks for an operating system to load. Additionally, the BIOS stores hardware configuration information, such as the settings for the CPU, memory, and other devices connected to the motherboard. This information is crucial for the proper functioning of the computer. The other options, such as Linux kernel version, timezone, and the system's hostname, are not typically stored within the BIOS.

    Rate this question:

  • 7. 

    Which of the following commands reboots the system when using SysV init? (Choose TWO correct answers.)

    • A.

      Telinit 0

    • B.

      Telinit 6

    • C.

      Shutdown -r “rebooting”

    • D.

      Shutdown -r now

    • E.

      Shutdown -k now “rebooting”

    Correct Answer(s)
    B. Telinit 6
    D. Shutdown -r now
    Explanation
    The correct answers are "telinit 6" and "shutdown -r now". "telinit 6" is a command that initiates a system reboot in SysV init. "shutdown -r now" is another command that immediately reboots the system.

    Rate this question:

  • 8. 

    Which of the following are init systems used within Linux systems? (Choose THREE correct answers.)

    • A.

      SysV init

    • B.

      Startd

    • C.

      Systemd

    • D.

      Upstart

    • E.

      SysInit

    Correct Answer(s)
    A. SysV init
    C. Systemd
    D. Upstart
    Explanation
    SysV init, systemd, and Upstart are all init systems used within Linux systems. These init systems are responsible for managing the booting process and starting and stopping services on a Linux system. SysV init is the traditional init system used in older versions of Linux, while systemd is a more modern init system that has become the standard in many Linux distributions. Upstart is another init system that was used in some distributions but has been largely replaced by systemd.

    Rate this question:

  • 9. 

    Which file in the /proc filesystem lists parameters passed from the bootloader to the kernel? (Specify the file name only without any path.)

    Correct Answer(s)
    cmdline, /proc/cmdline
    Explanation
    The correct answer is "/proc/cmdline". This file in the /proc filesystem lists the parameters that are passed from the bootloader to the kernel. It contains the command line arguments that were used to boot the kernel, including options such as the root device, kernel parameters, and other configuration settings. By accessing this file, one can view and modify the parameters passed to the kernel during the boot process.

    Rate this question:

  • 10. 

    What information can the lspci command display about the system hardware? (Choose THREE correct answers.)

    • A.

      PCI bus speed

    • B.

      System battery type

    • C.

      Device vendor identification

    • D.

      Ethernet MAC address

    • E.

      Device IRQ settings

    Correct Answer(s)
    A. PCI bus speed
    C. Device vendor identification
    E. Device IRQ settings
    Explanation
    The lspci command can display information about the system hardware such as the PCI bus speed, device vendor identification, and device IRQ settings. It does not provide information about the system battery type or Ethernet MAC address.

    Rate this question:

  • 11. 

    Which of the following commands brings a system running SysV init into a state in which it is safe to perform maintenance tasks? (Choose TWO correct answers.)

    • A.

      Shutdown -single now

    • B.

      Runlevel 1

    • C.

      Telinit 1

    • D.

      Shutdown -R 1 now

    • E.

      Init 1

    Correct Answer(s)
    C. Telinit 1
    E. Init 1
    Explanation
    The commands "telinit 1" and "init 1" both bring a system running SysV init into a state where it is safe to perform maintenance tasks. These commands switch the system to runlevel 1, also known as single-user mode or maintenance mode. In this mode, only essential services are started, and the system is in a minimal state, allowing for maintenance tasks to be performed without interference from other processes.

    Rate this question:

  • 12. 

    What is the first program that is usually started, at boot time, by the Linux kernel when using SysV init?

    • A.

      /boot/init

    • B.

      /lib/init.so

    • C.

      /sbin/init

    • D.

      /etc/rc.d/rcinit

    • E.

      /proc/sys/kernel/init

    Correct Answer
    C. /sbin/init
    Explanation
    The correct answer is /sbin/init. This is the first program that is usually started by the Linux kernel when using SysV init. Init is responsible for initializing the system and starting all other processes. It is located in the /sbin directory, which contains essential system binaries.

    Rate this question:

  • 13. 

    Which command will display messages from the kernel that were output during the normal boot sequence?

    Correct Answer
    dmesg, /bin/dmesg
    Explanation
    The command "dmesg" or "/bin/dmesg" will display messages from the kernel that were output during the normal boot sequence. This command is commonly used to troubleshoot and diagnose any issues that may have occurred during the boot process. By running this command, users can view important information and error messages related to hardware, drivers, and system initialization, providing valuable insights into the system's health and any potential problems that may need to be addressed.

    Rate this question:

  • 14. 

    Which of the following commands will write a message to the terminals of all logged in users?

    • A.

      Mesg

    • B.

      Print

    • C.

      Wall

    • D.

      Yell

    • E.

      Bcast

    Correct Answer
    C. Wall
    Explanation
    The "wall" command is used to write a message to the terminals of all logged in users. It is a broadcast command that sends a message to all users who are currently logged in, regardless of their location or terminal. This command is commonly used by system administrators to send important announcements or notifications to all users on a system.

    Rate this question:

  • 15. 

    Which of the following kernel parameters instructs the kernel to suppress most boot messages?

    • A.

      Verbose=0

    • B.

      Nomesg

    • C.

      Silent

    • D.

      Quiet

    Correct Answer
    D. Quiet
    Explanation
    The kernel parameter "quiet" instructs the kernel to suppress most boot messages. By using this parameter, the system will not display detailed information during the boot process, resulting in a quieter boot experience. This can be useful in situations where the user wants a cleaner and less cluttered boot screen without unnecessary messages.

    Rate this question:

  • 16. 

    Which of the following options for the kernel’s command line changes the systemd boot target to rescue.target instead of the default target?

    • A.

      Systemd.target=rescue.target

    • B.

      Systemd.runlevel=rescue.target

    • C.

      Systemd.service=rescue.target

    • D.

      Systemd.default=rescue.target

    • E.

      Systemd.unit=rescue.target

    Correct Answer
    E. Systemd.unit=rescue.target
    Explanation
    The correct answer is "systemd.unit=rescue.target". This option changes the systemd boot target to rescue.target instead of the default target. The systemd.unit parameter is used to specify the systemd unit that should be activated during boot, and in this case, it is set to rescue.target which is the target for rescue mode.

    Rate this question:

  • 17. 

    After modifying GNU GRUB’s configuration file, which command must be run for the changes to take effect?

    • A.

      Kill -HUP $(pidof grub)

    • B.

      Grub-install

    • C.

      Grub

    • D.

      No action is required

    Correct Answer
    D. No action is required
    Explanation
    After modifying GNU GRUB's configuration file, no action is required for the changes to take effect. The changes made in the configuration file are automatically applied and take effect without the need for any additional command or action.

    Rate this question:

  • 18. 

    Which of the following commands is used to update the list of available packages when using dpkg based package management?

    • A.

      Apt-get refresh

    • B.

      Apt-cache upgrade

    • C.

      Apt-get upgrade

    • D.

      Apt-get update

    • E.

      Apt-cache update

    Correct Answer
    D. Apt-get update
    Explanation
    The correct answer is apt-get update. This command is used to update the list of available packages when using dpkg based package management. It retrieves the latest package information from the repositories and updates the local package database.

    Rate this question:

  • 19. 

    Which of the following commands lists the dependencies of a given dpkg package?

    • A.

      Apt-cache depends-on package

    • B.

      Apt-cache dependencies package

    • C.

      Apt-cache depends package

    • D.

      Apt-cache requires package

    Correct Answer
    C. Apt-cache depends package
    Explanation
    The apt-cache depends command is used to list the dependencies of a given dpkg package. It allows users to view the package's dependencies, which are other packages that must be installed for the package to function properly. This command is useful for troubleshooting and managing package dependencies in a Linux system.

    Rate this question:

  • 20. 

    Which of the following options is used in a GRUB Legacy configuration file to define the amount of time that the GRUB menu will be shown to the user?

    • A.

      Splash

    • B.

      Timeout

    • C.

      Hidemenu

    • D.

      Showmenu

    Correct Answer
    B. Timeout
    Explanation
    The correct answer is "timeout". In a GRUB Legacy configuration file, the "timeout" option is used to define the amount of time that the GRUB menu will be shown to the user. This option allows the user to select an operating system or boot option before the default option is automatically selected.

    Rate this question:

  • 21. 

    What can the Logical Volume Manager (LVM) be used for? (Choose THREE correct answers.)

    • A.

      To create RAID 9 arrays.

    • B.

      To dynamically change the size of logical volumes.

    • C.

      To encrypt logical volumes.

    • D.

      To create snapshots.

    • E.

      To dynamically create or delete logical volumes.

    Correct Answer(s)
    B. To dynamically change the size of logical volumes.
    D. To create snapshots.
    E. To dynamically create or delete logical volumes.
    Explanation
    The Logical Volume Manager (LVM) can be used for dynamically changing the size of logical volumes, creating snapshots, and dynamically creating or deleting logical volumes. LVM allows for flexible management of storage by abstracting the physical storage devices and providing logical volumes that can be resized as needed. Snapshots can be created to capture the state of a logical volume at a specific point in time. Logical volumes can also be created or deleted on the fly, allowing for easy management of storage space.

    Rate this question:

  • 22. 

    Which of the following commands updates the linker cache of shared libraries?

    • A.

      Soconfig

    • B.

      Ldconfig

    • C.

      Mkldconfig

    • D.

      Mkcache

    • E.

      Lddconfig

    Correct Answer
    B. Ldconfig
    Explanation
    ldconfig is the correct answer because it is a command used in Linux systems to update the linker cache of shared libraries. The linker cache is a database that stores information about shared libraries and their locations, allowing the system to quickly locate and load the required libraries when an executable is run. By running ldconfig, the system updates this cache, ensuring that any changes or additions to shared libraries are recognized and accessible by the system.

    Rate this question:

  • 23. 

    Which of the following commands lists all currently installed packages when using RPM package management?

    • A.

      Yum –query –all

    • B.

      Yum –list –installed

    • C.

      Rpm –query –all

    • D.

      Rpm –list –installed

    Correct Answer
    C. Rpm –query –all
    Explanation
    The correct answer is "rpm --query --all" because this command is used in RPM package management to list all currently installed packages. The "--query" option is used to query the package database, and the "--all" option is used to display all packages without any filters.

    Rate this question:

  • 24. 

    Which of the following commands can be used to download the RPM package kernel without installing it?

    • A.

      Yumdownloader kernel

    • B.

      Rpm –download –package kernel

    • C.

      Yum download –no-install kernel

    • D.

      Rpmdownload kernel

    Correct Answer
    A. Yumdownloader kernel
    Explanation
    The correct answer is "yumdownloader kernel". The yumdownloader command is used to download RPM packages from the repositories without installing them. In this case, it is specifically used to download the kernel package. The other options provided are not valid commands for downloading RPM packages without installation.

    Rate this question:

  • 25. 

    When using rpm –verify to check files created during the installation of RPM packages, which of the following information is taken into consideration? (Choose THREE correct answers.)

    • A.

      GnuPG signatures

    • B.

      Timestamps

    • C.

      MD5 checksums

    • D.

      Inodes

    • E.

      File sizes

    Correct Answer(s)
    B. Timestamps
    C. MD5 checksums
    E. File sizes
    Explanation
    When using rpm --verify to check files created during the installation of RPM packages, the following information is taken into consideration:

    1. Timestamps: The timestamps of the files are checked to ensure that they have not been modified since the installation.

    2. MD5 checksums: The MD5 checksums of the files are compared to the original values stored during installation to verify the integrity of the files.

    3. File sizes: The sizes of the files are compared to the expected sizes to ensure that they have not been altered.

    These three factors are important in ensuring the integrity and consistency of the installed RPM packages.

    Rate this question:

  • 26. 

    Which of the following is correct when talking about mount points?

    • A.

      Files within a directory are deleted when the directory is used as a mount point.

    • B.

      Directories need to have the SetUID flag set to be used as a mount point.

    • C.

      Every existing directory can be used as a mount point.

    • D.

      Only empty directories can be used as a mount point.

    Correct Answer
    C. Every existing directory can be used as a mount point.
    Explanation
    Every existing directory can be used as a mount point. This means that any directory on a file system can be designated as a mount point for another file system. When a file system is mounted on a directory, the contents of that directory are hidden and replaced by the contents of the mounted file system. It is not necessary for the directory to be empty or have any specific permissions or flags set in order to be used as a mount point.

    Rate this question:

  • 27. 

    Which function key is used to start Safe Mode in Windows NT?

    • A.

      F10

    • B.

      F8

    • C.

      F6

    • D.

      Windows NT does not support Safe Mode

    Correct Answer
    D. Windows NT does not support Safe Mode
    Explanation
    Safe Mode is a troubleshooting mode in Windows that starts the operating system with a minimal set of drivers and services. It allows users to diagnose and fix problems that may be preventing the computer from starting normally. However, Windows NT does not have a built-in Safe Mode feature like newer versions of Windows. Therefore, the correct answer is that Windows NT does not support Safe Mode.

    Rate this question:

  • 28. 

    Which of the following environment variables overrides or extends the list of directories holding shared libraries?

    • A.

      LD_LOAD_PATH

    • B.

      LD_LIB_PATH

    • C.

      LD_LIBRARY_PATH

    • D.

      LD_SHARE_PATH

    • E.

      LD_RUN_PATH

    Correct Answer
    C. LD_LIBRARY_PATH
    Explanation
    LD_LIBRARY_PATH is the correct answer because it is an environment variable that overrides or extends the list of directories holding shared libraries. When a program is run, the operating system searches for the required shared libraries in the directories specified by LD_LIBRARY_PATH before searching the default directories. This allows users to specify additional directories for shared libraries, enabling the program to locate and load the required libraries successfully.

    Rate this question:

  • 29. 

    Which world-writable directory should be placed on a separate partition in order to prevent users from being able to fill up the / filesystem? (Specify the full path to the directory.)

    Correct Answer
    /tmp, tmp, /var/tmp, /tmp/, /var/tmp/
    Explanation
    The /tmp and /var/tmp directories are commonly used for temporary files and are world-writable by default. Placing these directories on a separate partition can prevent users from filling up the root (/) filesystem, which could potentially cause system instability or denial of service. By isolating these directories, any excessive usage or filling up of the partition will not affect the overall system.

    Rate this question:

  • 30. 

    Which RPM command will output the name of the package which supplied the file /etc/exports?

    • A.

      Rpm -qf /etc/exports

    • B.

      Rpm -qi /etc/exports

    • C.

      Rpm -F /etc/exports

    • D.

      Rpm -qp /etc/exports

    • E.

      Rpm -Kl /etc/exports

    Correct Answer
    A. Rpm -qf /etc/exports
    Explanation
    The correct answer is "rpm -qf /etc/exports". This command is used to query the RPM database and find out which package provided a specific file. In this case, it will output the name of the package that supplied the file "/etc/exports".

    Rate this question:

  • 31. 

    In which directory must definition files be placed to add additional repositories to yum?

    Correct Answer
    /etc/yum.repos.d, /etc/yum.repos.d/, yum.repos.d, yum.repos.d/
    Explanation
    Definition files must be placed in the /etc/yum.repos.d directory in order to add additional repositories to yum.

    Rate this question:

  • 32. 

    What is the name of the main configuration file for GNU GRUB? (Specify the file name only without any path.)

    Correct Answer
    menu.lst, grub.conf, grub.cfg
    Explanation
    The main configuration file for GNU GRUB can be named as menu.lst, grub.conf, or grub.cfg. This file contains the settings and options for the GRUB bootloader, which is responsible for loading the operating system on a computer. The specific name of the file may vary depending on the version and distribution of GNU GRUB being used.

    Rate this question:

  • 33. 

    When removing a package, which of the following dpkg options will completely remove the files including configuration files?

    • A.

      –clean

    • B.

      –delete

    • C.

      –purge

    • D.

      –remove

    Correct Answer
    C. –purge
    Explanation
    The option "-purge" is used with the dpkg command to completely remove a package and its associated files, including configuration files. This option ensures that all traces of the package are removed from the system, providing a clean uninstallation. The other options listed (-clean, -delete, -remove) do not remove configuration files, so they are not suitable for completely removing a package.

    Rate this question:

  • 34. 

    Which file should be edited to select the network locations from which Debian installation package files are loaded?

    • A.

      /etc/dpkg/dselect.cfg

    • B.

      /etc/dpkg/dpkg.cfg

    • C.

      /etc/apt/apt.conf

    • D.

      /etc/apt/apt.conf.d

    • E.

      /etc/apt/sources.list

    Correct Answer
    E. /etc/apt/sources.list
    Explanation
    The file that should be edited to select the network locations from which Debian installation package files are loaded is /etc/apt/sources.list. This file contains a list of repositories from which the package manager retrieves the necessary files and updates for the system. By editing this file, users can add or remove repositories to customize the package sources for their Debian installation.

    Rate this question:

  • 35. 

    Which option to the yum command will update the entire system? (Specify ONLY the option name without any additional parameters.)

    Correct Answer
    update, upgrade
    Explanation
    The options "update" and "upgrade" are both valid options for the yum command that can be used to update the entire system. These options download and install the latest versions of all packages on the system, ensuring that all software is up to date.

    Rate this question:

  • 36. 

    Which command will disable swapping on a device? (Specify ONLY the command without any path or parameters.)

    Correct Answer
    swapoff, /sbin/swapoff
    Explanation
    The command "swapoff" is used to disable swapping on a device. This command is typically located in the "/sbin" directory. By running this command without any path or parameters, the swapping functionality on the device will be turned off.

    Rate this question:

  • 37. 

    Which Debian package management tool asks the configuration questions for a specific already installed package just as if the package were being installed for the first time? (Specify ONLY the command without any path or parameters.)

    Correct Answer
    dpkg-reconfigure
    Explanation
    The Debian package management tool that asks the configuration questions for an already installed package as if it were being installed for the first time is "dpkg-reconfigure". This command allows the user to reconfigure the settings of a package, prompting them with the same questions that would be asked during the initial installation process.

    Rate this question:

  • 38. 

    Which of the following commands overwrites the bootloader located on /dev/sda without overwriting the partition table or any data following it?

    • A.

      Dd if=/dev/zero of=/dev/sda bs=512

    • B.

      Dd if=/dev/zero of=/dev/sda bs=512 count=1

    • C.

      Dd if=/dev/zero of=/dev/sda bs=440 count=1

    • D.

      Dd if=/dev/zero of=/dev/sda bs=440

    Correct Answer
    C. Dd if=/dev/zero of=/dev/sda bs=440 count=1
    Explanation
    The correct answer is "dd if=/dev/zero of=/dev/sda bs=440 count=1". This command uses the dd utility to overwrite the first 440 bytes of the /dev/sda device with zeros, effectively removing the bootloader without affecting the partition table or any data following it. The "count=1" parameter ensures that only one block of 440 bytes is overwritten.

    Rate this question:

  • 39. 

    Which of the following commands can be used to create a USB storage media from a disk image?

    • A.

      Gdisk

    • B.

      Dd

    • C.

      Cc

    • D.

      Fdisk

    • E.

      Mount

    Correct Answer
    B. Dd
    Explanation
    The "dd" command can be used to create a USB storage media from a disk image. This command is commonly used in Unix-like operating systems to convert and copy files. In this context, it can be used to create a bootable USB drive by copying the disk image onto the USB storage media. The "dd" command is powerful and can be used for various disk operations, including creating disk images, copying partitions, and backing up data.

    Rate this question:

  • 40. 

    In Bash, inserting 1>&2 after a command redirects

    • A.

      Standard output to standard input.

    • B.

      Standard error to standard output.

    • C.

      Standard input to standard error.

    • D.

      Standard error to standard input.

    • E.

      Standard output to standard error.

    Correct Answer
    E. Standard output to standard error.
    Explanation
    When "1>&2" is inserted after a command in Bash, it redirects the standard output (file descriptor 1) to the standard error (file descriptor 2). This means that any output generated by the command will be sent to the standard error stream instead of the standard output stream.

    Rate this question:

  • 41. 

    What command will generate a list of user names from /etc/passwd along with their login shell?

    • A.

      Column -s : 1,7 /etc/passwd

    • B.

      Chop -c 1,7 /etc/passwd

    • C.

      Colrm 1,7 /etc/passwd

    • D.

      Cut -d: -f1,7 /etc/passwd

    Correct Answer
    D. Cut -d: -f1,7 /etc/passwd
    Explanation
    The command "cut -d: -f1,7 /etc/passwd" will generate a list of user names from /etc/passwd along with their login shell. The "cut" command is used to extract specific columns from a file, and in this case, the delimiter (-d) is set to ":" and the fields (-f) to be extracted are 1 and 7. This will extract the first field (user name) and the seventh field (login shell) from the /etc/passwd file.

    Rate this question:

  • 42. 

    In a nested directory structure, which find command line option would be used to restrict the command to searching down a particular number of subdirectories?

    • A.

      -dirmax

    • B.

      -maxdepth

    • C.

      -maxlevels

    • D.

      -n

    • E.

      -s

    Correct Answer
    B. -maxdepth
    Explanation
    The correct answer is -maxdepth. This option is used to limit the depth of the search in a nested directory structure. By specifying a number after -maxdepth, the find command will only search for files and directories within that number of subdirectories. For example, if -maxdepth 2 is used, the search will be restricted to only two levels of subdirectories.

    Rate this question:

  • 43. 

    Which of the following statements is correct regarding the command foo 1> bar?

    • A.

      The command foo receives its stdin from the stdout of the command bar.

    • B.

      The stderr from the command foo is saved to the file bar.

    • C.

      The stdout from the command foo overwrites the file bar.

    • D.

      The stdout from the command foo is appended to the file bar.

    • E.

      The command foo receives its stdin from the file bar.

    Correct Answer
    C. The stdout from the command foo overwrites the file bar.
    Explanation
    The correct answer is that the stdout from the command foo overwrites the file bar. This means that the output of the command foo will be written to the file bar, replacing any existing content in the file.

    Rate this question:

  • 44. 

    Which of the following commands kills the process with the PID 123 but allows the process to “clean up” before exiting?

    • A.

      Kill -KILL 123

    • B.

      Kill -STOP 123

    • C.

      Kill -TERM 123

    • D.

      Kill -PIPE 123

    Correct Answer
    C. Kill -TERM 123
    Explanation
    The command "kill -TERM 123" kills the process with the PID 123 but allows the process to "clean up" before exiting. The -TERM option sends a termination signal to the process, allowing it to gracefully exit and perform any necessary cleanup tasks before terminating. This is in contrast to the -KILL option, which immediately terminates the process without giving it a chance to clean up. The -STOP and -PIPE options are not relevant to this scenario.

    Rate this question:

  • 45. 

    Which signal is missing from the following command that is commonly used to instruct a daemon to reinitialize itself, including reading configuration files? killall -s ________ daemon

    Correct Answer
    HUP, SIGHUP, 1
    Explanation
    The missing signal in the command is "HUP" or "SIGHUP" or "1". These signals are commonly used to instruct a daemon to reinitialize itself, including reading configuration files.

    Rate this question:

  • 46. 

    What is the maximum niceness value that a regular user can assign to a process with the nice command when executing a new process?

    • A.

      9

    • B.

      99

    • C.

      19

    • D.

      49

    Correct Answer
    C. 19
    Explanation
    The maximum niceness value that a regular user can assign to a process with the nice command when executing a new process is 19. Niceness values range from -20 to 19, with lower values indicating higher priority and higher values indicating lower priority. Regular users typically have limited privileges and cannot assign negative niceness values, so the maximum value they can assign is 19.

    Rate this question:

  • 47. 

    Immediately after deleting 3 lines of text in vi and moving the cursor to a different line, which single character command will insert the deleted content below the current line?

    • A.

      I (lowercase)

    • B.

      P (uppercase)

    • C.

      P (lowercase)

    • D.

      U (uppercase)

    • E.

      U (lowercase)

    Correct Answer
    C. P (lowercase)
    Explanation
    After deleting 3 lines of text in vi and moving the cursor to a different line, the command "p" (lowercase) will insert the deleted content below the current line.

    Rate this question:

  • 48. 

    A user accidentally created the subdirectory \\dir in his home directory. Which of the following commands will remove that directory?

    • A.

      Rmdir ~/’dir’

    • B.

      Rmdir ~/\\dir

    • C.

      Rmdir ‘~/\\dir’

    • D.

      Rmdir “~/\\dir”

    • E.

      Rmdir ~/\\\\dir

    Correct Answer
    E. Rmdir ~/\\\\dir
    Explanation
    The correct answer is "rmdir ~/\\\\dir". This command will remove the subdirectory named "dir" that was accidentally created in the user's home directory. The "~" symbol represents the user's home directory, and the "\\" is used to escape the special character "\". Therefore, this command will correctly target and remove the subdirectory.

    Rate this question:

  • 49. 

    In compliance with the FHS, in which of the directories are man pages found?

    • A.

      /usr/share/man

    • B.

      /opt/man

    • C.

      /usr/doc/

    • D.

      /var/pkg/man

    • E.

      /var/man

    Correct Answer
    A. /usr/share/man
    Explanation
    Man pages, which are the documentation files for Unix and Unix-like operating systems, are typically found in the "/usr/share/man" directory. This directory follows the Filesystem Hierarchy Standard (FHS), which provides guidelines for organizing files and directories in Unix-like systems. The "/usr/share/man" directory is commonly used to store system-wide documentation, including man pages, making it the correct answer in this case.

    Rate this question:

  • 50. 

    Which of the following commands will send output from the program myapp to both standard output (stdout) and the file file1.log?

    • A.

      Cat < myapp | cat > file1.log

    • B.

      Myapp 0>&1 | cat > file1.log

    • C.

      Myapp | cat > file1.log

    • D.

      Myapp | tee file1.log

    • E.

      Tee myapp file1.log

    Correct Answer
    D. Myapp | tee file1.log
    Explanation
    The command "myapp | tee file1.log" will send the output from the program myapp to both standard output (stdout) and the file file1.log. The tee command is used to read from standard input and write to both standard output and files. In this case, it will read the output from myapp and write it to both the console and the file file1.log.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Feb 05, 2019
    Quiz Created by
    Catherine Halcomb
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.