โ† All Linux Flashcard Decks

Linux+ Filesystem and Storage Management Flashcards

7 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 7 Linux+ Filesystem and Storage Management flashcards as text
  1. An administrator wants to create a 2GB swap file. Which sequence of commands is correct?

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

    Creating a swap file requires allocating space, setting permissions to 600 (root-only), formatting with mkswap, then activating with swapon.

  2. Which ext4 filesystem feature allows the filesystem to record where data was being written in case of a crash?

    Answer: Journaling

    Journaling records pending metadata (and optionally data) changes to a journal before committing them, enabling recovery after a crash.

  3. What does 'vgextend vg0 /dev/sdc' accomplish?

    Answer: Adds /dev/sdc as a physical volume to the existing vg0 group

    vgextend adds an initialized physical volume to an existing volume group, increasing the total available storage pool.

  4. A file has permissions -rwsr-xr-x. What does the 's' in the owner execute position indicate?

    Answer: SUID bit is set

    The 's' in the owner's execute position indicates the SUID (Set User ID) bit, which causes the file to execute with the file owner's privileges.

  5. Which command shows the current I/O statistics for all block devices in real time?

    Answer: iostat -x 1

    iostat -x 1 displays extended I/O statistics for all block devices, refreshing every second.

  6. What is the default behavior when a bind mount is created using 'mount --bind /src /dst'?

    Answer: Makes /src accessible at /dst without duplicating data

    A bind mount makes an existing directory accessible at another path; both paths refer to the same underlying filesystem content.

  7. Which /proc file would you read to see the current swappiness value on a running system?

    Answer: /proc/sys/vm/swappiness

    /proc/sys/vm/swappiness holds the kernel's current swappiness setting (0-200), which controls how aggressively the kernel swaps memory pages.