← All Linux Flashcard Decks

Mixed Deck — All Linux Topics Flashcards

100 cards from real Linux practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 20 Mixed Deck — All Linux Topics flashcards as text
  1. Which line should appear at the very top of a bash script to specify the interpreter?

    Answer: #!/bin/bash

    The shebang `#!/bin/bash` tells the kernel which interpreter to use when the script is executed directly.

  2. Which `nftables` command lists all current rulesets?

    Answer: nft list ruleset

    `nft list ruleset` displays the complete nftables configuration including all tables, chains, and rules.

  3. Which IRQ number is traditionally assigned to the primary ATA/IDE controller on legacy x86 systems?

    Answer: 14

    IRQ 14 is the traditional IRQ for the primary IDE/ATA controller on legacy x86 hardware.

  4. What does `rpm -V package-name` do?

    Answer: Checks installed files against the RPM database

    `rpm -V` (verify) compares the installed files of a package against metadata stored in the RPM database to detect changes.

  5. What role does collaboration play in boot process for Linux professionals?

    Answer: It enhances outcomes through diverse perspectives and shared expertise

    Collaboration leverages diverse perspectives and combined expertise to achieve better outcomes than any individual could alone.

  6. Which command converts a physical partition to an LVM physical volume?

    Answer: pvcreate /dev/sdb1

    pvcreate initializes a disk or partition as an LVM physical volume by writing LVM metadata to it.

  7. What is the purpose of swap space in Linux?

    Answer: Provides overflow virtual memory on disk when RAM is full, and stores hibernation state

    Swap extends the system's virtual memory by using disk space, and is used to store the contents of RAM during hibernation (suspend-to-disk).

  8. What does 'find / -perm -4000' search for?

    Answer: Files with the SUID bit set

    -perm -4000 matches files where the SUID bit (4000) is set, which can be a privilege escalation risk.

  9. What does `sed -n '5,10p'` do when applied to a file?

    Answer: Prints only lines 5 through 10 to stdout

    sed -n suppresses automatic printing, and '5,10p' explicitly prints only lines 5 through 10.

  10. When systemd starts units in parallel, what mechanism does it use to determine dependency order?

    Answer: Unit file directives like After=, Before=, Requires=, and Wants=

    systemd uses dependency directives (After=, Before=, Requires=, Wants=) in unit files to build a dependency graph for ordered parallel startup.

  11. Which command shows all open network ports and the processes listening on them?

    Answer: ss -tlnp

    ss -tlnp shows TCP listening ports (-t -l), numeric addresses (-n), and the owning process (-p).

  12. A Linux administrator needs to view which I/O ports are currently in use by the kernel. Which file provides this information?

    Answer: /proc/ioports

    /proc/ioports lists the I/O port ranges currently allocated to kernel devices.

  13. Which dnf command downloads a package's RPM file to the current directory WITHOUT installing it?

    Answer: dnf download

    `dnf download` retrieves the RPM file from the configured repositories without performing installation.

  14. Which of the following best describes the function of a systemd target?

    Answer: A grouping of systemd units that serves as a synchronization point during boot.

    A systemd target is a special unit file that groups other units together. Targets are used to bring the system to a specific state, like `multi-user.target` or `graphical.target`, by starting all the services and other units defined within that group. They are a more flexible replacement for the traditional SysV init runlevels.

  15. Which tool is used to audit system calls made by a process for security analysis on Linux?

    Answer: strace

    strace intercepts and records system calls made by a process, making it useful for security and debugging analysis.

  16. What role does calibration play in maintaining technical accuracy for Linux professionals?

    Answer: It ensures instruments and methods produce accurate, consistent results over time

    Regular calibration ensures that instruments, tools, and methods continue to produce accurate and consistent results over time. Without calibration, measurement drift and equipment wear can lead to unreliable outcomes.

  17. Which file in a Linux system contains information about the system’s disk partitions?

    Answer: /etc/fstab

    The `/etc/fstab` file (file system table) contains static information about the file systems that are mounted on the system. It specifies how and where disk partitions, network shares, and other storage devices should be mounted during the boot process. This file is essential for ensuring that all necessary file systems are available when the system starts.

  18. Which command displays per-CPU usage statistics interactively, similar to top but focused on each core?

    Answer: mpstat -P ALL 1

    mpstat -P ALL 1 reports CPU statistics for each individual processor every 1 second.

  19. What does the `..` path component represent in Linux?

    Answer: The parent directory

    `..` is a special directory entry that always refers to the parent of the current directory.

  20. What is the MOST important reason for Linux professionals to maintain continuing education?

    Answer: To stay current with evolving standards, practices, and regulations

    Continuing education ensures professionals remain current with evolving industry standards, best practices, and regulatory requirements. This directly impacts the quality of service provided and maintains public trust in the profession.