โ† All RHCSA Flashcard Decks

RHCSA Linux Essentials Flashcards

7 cards from real RHCSA practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 RHCSA Linux Essentials flashcards as text
  1. Which command shows all active listening TCP and UDP ports with associated process names?

    Answer: ss -tulnp

    `ss -tulnp` shows TCP/UDP listening sockets with numeric addresses and the owning process.

  2. You need to create a 2 GiB swap file at /swapfile. What is the correct sequence?

    Answer: dd if=/dev/zero of=/swapfile bs=1M count=2048; chmod 600 /swapfile; mkswap /swapfile; swapon /swapfile

    The full correct sequence creates the file, sets strict permissions (600), formats it as swap, then activates it.

  3. Which firewalld command permanently opens port 8080/tcp in the public zone?

    Answer: firewall-cmd --permanent --zone=public --add-port=8080/tcp

    The `--permanent` flag writes the rule to the zone's XML config so it persists after a reload or reboot.

  4. What does the `lsblk` command display?

    Answer: Block device tree with mount points and sizes

    `lsblk` lists block devices in a tree format showing name, size, type, and mount point.

  5. A cron job entry reads: `*/15 * * * * /script.sh`. How often does it run?

    Answer: Every 15 minutes

    `*/15` in the minute field means 'every 15 minutes' (0, 15, 30, 45).

  6. Which command would you use to restore the default SELinux context on a file?

    Answer: restorecon /path/file

    `restorecon` resets a file's SELinux context to the policy default stored in the file context database.

  7. What command lists all enabled systemd services that start at boot?

    Answer: systemctl list-unit-files --type=service --state=enabled

    `systemctl list-unit-files --type=service --state=enabled` shows only unit files with enabled state.