Knowledge

Linux standards

Expect different rules for different parts

Think of a board game with written rules: different players can make the same move and expect the same result. Software standards play a similar role. They describe expected behavior for a particular part of a computer system, such as a command or file location, so programs have a shared target. Each standard covers only some behavior, so no single document makes every command and distribution identical.

POSIX defines operating-system interfaces and utilities, including a standard shell language and command behavior. A program that follows the relevant POSIX requirements has a defined portability target, but output and optional features can still vary by implementation. A Linux manual page may include a STANDARDS section describing which rules apply to that command or interface. Following one standard option does not make every nearby feature portable.

The Filesystem Hierarchy Standard (FHS) gives requirements and guidelines for where files and directories should go on Unix-like systems. It gives applications and tools shared expectations for configuration, binaries, and variable data. FHS is a reference for a directory layout, not proof that every distribution uses every path identically. Local policy and distribution choices still matter.

The Linux Standard Base (LSB) was a versioned set of specifications intended to help applications work across Linux systems. Its 5.0 specifications date to 2015 and are archived. LSB is useful historical material for understanding earlier compatibility targets, not a current universal certification for all distributions or programs. Check the exact version, architecture, and product standard named by a requirement.

For a shell script meant to run across Unix-like systems, target POSIX shell syntax and invoke the platform's documented sh path, commonly /bin/sh on Linux. Bash arrays and [[ ... ]] are Bash extensions, not POSIX shell syntax. An FHS location may be a useful convention; if an application documents a different configuration path, follow that application's instructions.

For a command, inspect its local manual and read STANDARDS if the section exists. A POSIX utility page may be installed under a section such as 1p, though packaging varies. Compare the exact behavior your program depends on. A shell builtin or GNU utility may document extensions beyond POSIX. Standards give a precise target, but verify the behavior on the implementations and versions you need to support.

Interactive exercises

Materials

Skillsets
Skillset Linux for backend developer preview
image descriptionLinux for backend developer
by Artem Naumenko (fb)
16 users
Skillset Linux administrator preview
image descriptionLinux administrator
by Infinite Education
3080 users
Skillset Devops preview
image descriptionDevops
by Ajay Kumar
2004 users
Skillset Devops preview
image descriptionDevops
by Dio
3 users
Do you know that ...?
Any useful or interesting facts about the skill. Any peace of information would be useful