Linux

Linux is a kernel and computing platform. It support virtually every filesystem. Linux has many distributions, such as Arch Linux or Alpine Linux, Proxmox, etc. The default init system is Systemd. See mkinitcpio for other boot time configuration. Linux has GUIs but is generally used with the Shell. The kernel development can be tracked here

Filesystem Structure

A typical Linux system has, among others, the following directories:

PathDescription
/This is the root directory. This is where the whole tree starts.
/binThis directory contains executable programs which are needed in single user mode and to bring the system up or repair it.
/bootContains static files for the boot loader. This directory holds only the files which are needed during the boot process. The operating system kernel (initrd for example) must be located in either / or /boot.
/devSpecial or device files, which refer to physical devices.
/etcContains configuration files which are local to the machine.
/homeOn machines with home directories for users, these are usually beneath this directory, directly or not.
/libThis directory should hold those shared libraries that are necessary to boot the system and to run the commands in the root filesystem.
/lib/modulesLoadable kernel modules (optional)
/lost+foundThis comes from Ext4. This directory contains items lost in the filesystem.
/mediaThis directory contains mount points for removable media such as CD and DVD disks or USB sticks.
/mntThis directory is a mount point for a temporarily mounted filesystem.
/procThis is a mount point for the proc filesystem, which provides information about running processes and the kernel.
/rootThis directory is usually the home directory for the root user (optional).
/runThis directory contains information which describes the system since it was booted. Once this purpose was served by /var/run and programs may continue to use it.
/sbinLike /bin, this directory holds commands needed to boot the system, but which are usually not executed by normal users.
/sysThis is a mount point for the sysfs filesystem, which provides information about the kernel like /proc, but better structured, following the formalism of kobject infrastructure.
/tmpThis directory contains temporary files which may be deleted with no notice, such as by a regular job or at system boot up.
/usrThis directory is usually mounted from a separate partition. It should hold only shareable, read-only data, so that it can be mounted by various machines running Linux.
/usr/binThis is the primary directory for executable programs. Most programs executed by normal users which are not needed for booting or for repairing the system and which are not installed locally should be placed in this directory.
/usr/etcSite-wide configuration files to be shared between several machines may be stored in this directory. However, commands should always reference those files using the /etc directory. Links from files in /etc should point to the appropriate files in /usr/etc.
/usr/includeInclude files for the C compiler.
/usr/libObject libraries, including dynamic libraries, plus some executables which usually are not invoked directly. More complicated programs may have whole subdirectories there.
/usr/shareThis directory contains subdirectories with specific application data, that can be shared among different architectures of the same OS.
/usr/share/docDocumentation about installed programs (optional).
/usr/share/manManual pages go here in subdirectories according to the man page sections.
/varThis directory contains files which may change in size, such as spool and log files.
/var/cacheData cached for programs.
/var/logMiscellaneous log files.

Kernel Commandline

The kernel, the programs running in the initrd and in the host system may be configured at boot via kernel command line arguments.

The current cmdline can be seen at /proc/cmdline. For setting the cmdline use /etc/kernel/cmdline if you use UKIs.

Common Kernel Cmdline Arguments:

ArgumentDescription
quietParameter understood by both the kernel and the system and service manager to control console log verbosity.
splashShow a plymouth splash screen while booting.
init=This sets the initial command to be executed by the kernel. If this is not set, or cannot be found, the kernel will try /sbin/init, then /etc/init, then /bin/init, then /bin/sh and panic if all of this fails.
ro and rwThe ro option tells the kernel to mount the root filesystem as ‘read-only’. The rw option tells the kernel to mount the root filesystem read/write. This is the default.
resume=...This tells the kernel the location of the suspend-to-disk data that you want the machine to resume from after hibernation. Usually, it is the same as your swap partition or file. Example: resume=/dev/hda2
panic=NBy default, the kernel will not reboot after a panic, but this option will cause a kernel reboot after N seconds (if N is greater than zero). This panic timeout can also be set by echo N > /proc/sys/kernel/panic
plymouth.enable=May be used to disable the Plymouth boot splash. For details, see plymouth.
vconsole.keymap=, vconsole.keymap_toggle=, vconsole.font=, vconsole.font_map=, vconsole.font_unimap=Parameters understood by the virtual console setup logic. For details, see vconsole.conf
luks=, rd.luks=Defaults to “yes”. If “no”, disables the crypt mount generator entirely. rd.luks= is honored only in the initrd while luks= is honored by both the main system and in the initrd.
luks.crypttab=, rd.luks.crypttab=Defaults to “yes”. If “no”, causes the generator to ignore any devices configured in /etc/crypttab (luks.uuid= will still work however). rd.luks.crypttab= is honored only in initrd while luks.crypttab= is honored by both the main system and in the initrd.
luks.uuid=, rd.luks.uuid=Takes a LUKS superblock UUID as argument. This will activate the specified device as part of the boot process as if it was listed in /etc/crypttab. This option may be specified more than once in order to set up multiple devices. rd.luks.uuid= is honored only in the initrd, while luks.uuid= is honored by both the main system and in the initrd.
luks.name=, rd.luks.name=Takes a LUKS super block UUID followed by an = and a name. This implies rd.luks.uuid= or luks.uuid= and will additionally make the LUKS device given by the UUID appear under the provided name. rd.luks.name= is honored only in the initrd, while luks.name= is honored by both the main system and in the initrd.
luks.options=, rd.luks.options=Takes a LUKS super block UUID followed by an = and a string of options separated by commas as argument. This will override the options for the given UUID. If only a list of options, without a UUID, is specified, they apply to any UUIDs not specified elsewhere, and without an entry in /etc/crypttab. rd.luks.options= is honored only by initial RAM disk (initrd) while luks.options= is honored by both the main system and in the initrd.
fstab=, rd.fstab=Defaults to “yes”. If “no”, causes the generator to ignore any mounts or swap devices configured in /etc/fstab. rd.fstab= is honored only in the initrd, while fstab= is honored by both the main system and the initrd.
root=Configures the operating system’s root filesystem to mount when running in the initrd. This accepts a device node path (usually /dev/disk/by-uuid/... or similar), or the special values gpt-auto, fstab, and tmpfs. Use gpt-auto to explicitly request automatic root file system discovery via systemd-gpt-auto-generator. Use fstab to explicitly request automatic root file system discovery via the initrd /etc/fstab rather than via kernel command line. Use tmpfs in order to mount a tmpfs file system as root file system of the OS. This is useful in combination with mount.usr= in order to combine a volatile root file system with a separate, immutable /usr/ file system. Also see systemd.volatile= below.
rootfstype=Takes the root filesystem type that will be passed to the mount command. rootfstype= is honored by the initrd.
mount.usr=Takes the /usr/ filesystem to be mounted by the initrd. If mount.usrfstype= or mount.usrflags= is set, then mount.usr= will default to the value set in root=. Otherwise, this parameter defaults to the /usr/ entry found in /etc/fstab on the root filesystem.
mount.usrfstype=Takes the /usr filesystem type that will be passed to the mount command.
systemd.volatile=Controls whether the system shall boot up in volatile mode.
systemd.swap=Takes a boolean argument or enables the option if specified without an argument. If disabled, causes the generator to ignore any swap devices configured in /etc/fstab. Defaults to enabled.

Misc

Cause a kernel panic

To manually cause a kernel panic run:

echo c > /proc/sysrq-trigger