Curated

System Management

0 votes

All cards206

  1. To create a shortcut named ll that runs ls -l, a user types ___ ll='ls -l' at the shell prompt.

    alias

  2. (image)

    Each term is an ss option that filters or formats the socket listing in a different way.

  3. Which FHS directory holds host-specific system configuration files?

    /etc holds host-specific configuration files, such as /etc/fstab and /etc/passwd. By FHS convention it contains only static, text-based configuration, not executable binaries.

  4. On a 64-bit Arm Linux system, what is the architecture's 64-bit execution state called, and what does uname -m report?

    It is AArch64, and uname -m reports aarch64. Package architecture labels differ by distribution: Debian-family systems use arm64, while RHEL, Fedora and SUSE use aarch64.

  5. Fedora, RHEL, and openSUSE belong to which package-format family?

    They are RPM-based distributions, using .rpm packages. Fedora and RHEL manage them with dnf, while openSUSE uses zypper.

  6. What does a window manager control on a Linux desktop?

    A window manager controls the placement, borders, stacking, and movement of application windows. Examples include i3, Openbox, and Mutter, and it runs after login, unlike a display manager.

  7. Software whose license withholds source code and restricts copying, modification and redistribution is called what?

    Proprietary software. The vendor retains control over the code and usually grants only a right to use the software, as with Microsoft Windows.

  8. Which command unloads a kernel module but does not remove its unused dependencies?

    rmmod removes the named module from the running kernel and leaves any dependency modules loaded. Use modprobe -r instead to also unload dependencies that are no longer needed.

  9. Which command regenerates the initramfs for the currently running kernel on a dracut-based system, overwriting the existing image?

    dracut --force rebuilds the initramfs for the running kernel and overwrites the existing file. dracut --list-modules only prints available modules, and lsinitrd only inspects an image.

  10. Why do embedded devices often run Linux instead of a proprietary OS?

    Linux is open source, free to license, and can be trimmed down and customized for specific hardware. Routers, smart TVs, and industrial controllers commonly use stripped-down Linux builds.

  11. Which command creates a 10 GiB logical volume named data in volume group vg0?

    lvcreate -L 10G -n data vg0 creates it. The -L option sets an absolute size, while -l sets the size in extents or as a percentage such as 100%FREE.

  12. Which command deletes a volume group but leaves its physical volumes initialized?

    vgremove deletes the volume group and its metadata. The underlying physical volumes keep their LVM labels until pvremove is run on them.

  13. Which command wipes the LVM label from a device so it is no longer a physical volume?

    pvremove erases the LVM label and metadata from the device. The physical volume must first be removed from its volume group with vgreduce, or the command will refuse to run.

  14. Which tool creates and edits GPT partition tables with an fdisk-like interactive menu?

    gdisk (GPT fdisk) is the tool. It reads and writes GPT, and can convert MBR or BSD disklabels to GPT in memory.

  15. Which filesystem format stores data in RAM and is lost at reboot?

    tmpfs is a RAM-backed filesystem whose contents disappear on reboot or unmount. It suits scratch data such as /run and /dev/shm, and its size is capped by a mount option.

  16. Which mdadm option marks a member device of an array as faulty?

    The --fail option (-f), as in mdadm /dev/md0 --fail /dev/sdb1. A failed device must be marked faulty before it can be removed with --remove and replaced with --add.

  17. Which structure holds a file's metadata and block pointers but not its name?

    An inode. Directory entries map filenames to inode numbers, which is why the name is stored outside the inode.

  18. What is the field order of each entry in /etc/hosts?

    IP address, then the canonical hostname, then any optional aliases, separated by whitespace. For example, "192.0.2.10 web01.example.com web01" lets the host resolve both web01.example.com and web01 locally.

  19. Which nmcli command creates a new Ethernet connection profile named office on interface eth0?

    The nmcli connection add command creates a new profile, with type, con-name and ifname setting its properties. Connection modify only edits an existing profile, and device connect activates a device rather than creating a profile.

  20. Which command applies Netplan configuration permanently and immediately, with no automatic rollback?

    netplan apply. It reads the YAML files in /etc/netplan and pushes the settings to the backend renderer (systemd-networkd or NetworkManager).

  21. Which command prints the value of the PATH variable to the terminal?

    echo $PATH prints the value of PATH. The dollar sign tells the shell to expand the variable's value instead of printing its name.

  22. What does the path shortcut ~ expand to in the shell?

    The current user's home directory, such as /home/alice. The shell performs this tilde expansion before the command runs, and ~root expands to root's home directory.

  23. Which file does Bash read for interactive non-login shells, such as a new terminal window?

    Interactive non-login Bash shells read ~/.bashrc. Login shells read ~/.bash_profile instead, falling back to ~/.profile if it does not exist.

  24. Which shell syntax sends both stdout and stderr to the same file, out.log, in Bash?

    &> out.log (or the portable form > out.log 2>&1). In the portable form, order matters: 2>&1 must come after > out.log so stderr follows stdout into the file.

  25. In vi/vim, which command saves the file and exits from command mode?

    :wq (or :x, or ZZ in normal mode). The colon prefix enters command-line mode, where w writes the buffer and q quits the editor.

  26. Which cpio mode, selected with a single option letter, extracts files from an archive read on standard input?

    Copy-in mode, selected with -i (for example, cpio -idv < archive.cpio). The -d option creates leading directories as needed, and cpio also has copy-out (-o) and pass-through (-p) modes.

  27. Which command decompresses a .xz file while keeping the original compressed file?

    xz -dk file.xz (or unxz -k file.xz). By default xz deletes the source file after decompression, so -k (keep) is needed to retain it.

  28. Which dd operand sets the block size used for each read and write?

    bs=, as in bs=4M, sets the size of each block dd reads and writes. Larger values such as 4M usually speed up disk cloning compared with the 512-byte default.

  29. Which component emulates guest devices such as disks and network cards in user space?

    QEMU runs as a user-space process that emulates the virtual hardware devices a guest sees. KVM only supplies CPU and memory virtualization in the kernel, and libvirt is a management layer on top.

  30. Which virsh command changes the RAM allocated to a running KVM guest?

    virsh setmem changes a running guest's memory, up to the maximum set with virsh setmaxmem or in the domain XML. Memory can be raised only to that maximum, and a guest usually must be shut down to raise the maximum itself.

  31. Which deployment type gives a workload direct hardware access with no hypervisor overhead?

    Bare metal. The OS runs directly on the physical hardware, so performance is highest, but isolation, snapshots, and migration are less flexible than with VMs.

  32. Which VM network type lets guests talk only to each other and the host, with no outside access?

    Host-only (isolated) networking. Guests share a private virtual network with the host, but nothing is routed or translated to the external network.

  33. Which virsh command lists all defined guests, including those that are shut off?

    virsh list --all. Without --all, virsh list shows only running guests.

  34. Which boot component is started by firmware and loads the kernel and initrd into memory?

    The bootloader, such as GRUB 2. Its user-editable defaults live in /etc/default/grub, which is used to regenerate the final grub.cfg.

  35. What does the root= kernel parameter specify?

    The device the kernel mounts as the root filesystem, such as root=/dev/sda2 or root=UUID=<uuid>. It is appended to the linux line of the bootloader entry.

  36. On a Linux system that follows the FHS, device files such as /dev/sda are located in the /dev directory, which holds special files representing hardware and virtual devices.

    The FHS places device files in /dev, where they act as interfaces to hardware and virtual devices such as disks, terminals and /dev/null. This is easy to confuse with /proc, which exposes process and kernel information, not device nodes.

  37. Which architecture does a 64-bit Linux OS running on a Raspberry Pi 4 use?

    The Raspberry Pi 4 uses a 64-bit Arm CPU, so 64-bit Linux on it is AArch64. x86_64 is the Intel/AMD desktop and server architecture, not the one used in Raspberry Pi boards.

  38. Which command-line tool installs a local .deb file on a Debian-based system?

    dpkg -i installs a local .deb package directly. rpm -i is the equivalent low-level tool, but it handles .rpm files, not .deb files.

  39. Which statement correctly distinguishes Wayland from the X Server?

    In Wayland, the compositor acts as the display server and handles rendering and input directly, removing the separate X Server layer. Network-transparent client-server operation is a trait of X11, not Wayland.

  40. Which license type lets you embed code in closed-source products if you only credit the authors?

    Permissive licenses such as MIT and BSD allow reuse in closed-source products if the copyright notice is kept. Strong copyleft such as the GPL requires derivative works to stay under the same license.

  41. The lsmod command displays a module's description, author, license, and supported parameters.

    lsmod only lists currently loaded modules, showing each module's size, use count, and the modules that depend on it. The modinfo command is what displays a module's description, author, license, and parameters.

  42. Which command shows the memory ranges and block sizes of installed RAM, including online or offline state?

    lsmem. It reads the kernel's memory block information and shows ranges with their size and STATE (online or offline). By default it merges adjacent blocks with the same attributes; -a lists each block individually.

  43. When an initramfs image for the target kernel already exists, dracut refuses to replace it unless the long option ___ is added to the command.

    --force

  44. Offloading cryptocurrency mining or video transcoding to a GPU is a use case that depends on the GPU's high clock speed per core for sequential instruction processing, which a CPU cannot match.

    GPU workloads such as mining and transcoding benefit from thousands of cores running many simple operations in parallel, not from fast sequential execution. A CPU's fewer, faster cores are better suited to sequential, branch-heavy tasks.

  45. Which lvextend option adds 5 GiB to a logical volume's current size?

    -L with a + prefix adds the given size to the current size. Without the +, -L 5G sets the total size to 5 GiB, and -l +5 would add only 5 extents.

  46. Before a volume group is exported with vgexport, it must first be activated with vgchange -ay so that its logical volumes remain available while the disks are moved to another system.

    The statement reverses the required step. vgexport only works on an inactive volume group, so it must first be deactivated with vgchange -an, after unmounting its logical volumes. Activating it first would make vgexport fail because the logical volumes are still in use.

  47. Running pvmove /dev/sdb1 with no destination specified moves the allocated extents from /dev/sdb1 to a new physical volume that LVM automatically creates from unpartitioned disk space.

    LVM never creates a physical volume during pvmove. With no destination given, pvmove moves the extents to other existing physical volumes in the same volume group that have enough free extents. The destination must already be initialized with pvcreate and be in the volume group.

  48. The blkid command can display the UUID and filesystem type of a block device such as /dev/sda1.

    blkid reads device metadata and prints attributes such as UUID, TYPE and LABEL for block devices. lsblk -f shows similar information, but blkid is a dedicated tool for querying these identifiers, which are commonly used in /etc/fstab.

  49. By default, what maximum size does a tmpfs mount get if no size option is given?

    Without a size= option, tmpfs is capped at 50% of physical RAM. It does not claim that memory up front, and it only consumes what the stored files use.

  50. In mkfs, what does the -t option specify?

    The filesystem type to create, such as ext4 or xfs. For example, mkfs -t ext4 /dev/sdb1 runs the mkfs.ext4 helper.