Exploring Advanced Linux Concepts: Flashcards

Table of Contents

Advanced Linux Flashcards   drill advanced_linux

What is a chroot jail?

Front

What is a chroot jail and what is it used for in Linux?

Back

A chroot jail is a way to isolate a process and its children to a specific directory tree. It's used to:

  • Enhance security by limiting access to the file system
  • Test software in a controlled environment
  • Create a separate, minimal system for specific applications

Explain the concept of Linux namespaces

Front

What are Linux namespaces and how are they used?

Back

Linux namespaces are a feature of the Linux kernel that partitions kernel resources such that one set of processes sees one set of resources while another set of processes sees a different set of resources. They are used for:

  • Container technologies (e.g., Docker)
  • Process isolation
  • Network virtualization

What is the difference between soft and hard links?

Front

Explain the difference between soft (symbolic) links and hard links in Linux.

Back

  • Soft links (symbolic links):
    • Can link to directories
    • Can span file systems
    • Contain the path to the target file/directory
    • Become invalid if the target is moved or deleted
  • Hard links:
    • Can only link to files, not directories
    • Must exist on the same file system
    • Share the same inode as the original file
    • Remain valid even if the original file is moved or renamed

Explain Linux kernel modules

Front

What are Linux kernel modules and why are they important?

Back

Linux kernel modules are pieces of code that can be loaded and unloaded into the kernel upon demand. They are important because they:

  • Allow the kernel to be extended without needing to reboot
  • Keep the base kernel small by loading only necessary functionality
  • Enable support for new hardware without full kernel recompilation

Commands: insmod, rmmod, lsmod, modprobe

What is the purpose of the /proc filesystem?

Front

Describe the purpose and contents of the /proc filesystem in Linux.

Back

The /proc filesystem is a virtual filesystem that provides an interface to kernel data structures. It:

  • Contains information about system resources and processes
  • Allows for runtime system configuration
  • Provides a way to communicate with the kernel from user space
  • Contains files like /proc/cpuinfo, /proc/meminfo, and directories for each process ID

Explain Linux Control Groups (cgroups)

Front

What are Linux Control Groups (cgroups) and how are they used?

Back

Control Groups (cgroups) are a Linux kernel feature that:

  • Limits, accounts for, and isolates the resource usage of a collection of processes
  • Allows fine-grained control over allocating, prioritizing, denying, managing, and monitoring system resources
  • Is fundamental to containerization technologies
  • Can be used to limit CPU, memory, disk I/O, network, etc. for groups of processes

Author: Jason Walsh

j@wal.sh

Last Updated: 2024-10-30 16:43:54