.. SPDX-License-Identifier: CC-BY-4.0 Copyright 2026 The Linux Foundation Format ====== Short-form License IDs ---------------------- To add an SPDX short-form license ID to your code, add a line in the following form, using whatever comment format applies to that file's language, e.g.: * ``// SPDX-License-Identifier: MIT`` * ``/* SPDX-License-Identifier: MIT OR Apache-2.0 */`` * ``# SPDX-License-Identifier: GPL-2.0-or-later`` Very specifically, this consists of the following parts on *one line*: 1. (if required) The 'begin comment' characters for the applicable programming language (``/*``, ``//``, ``#``, ...) 2. The characters ``SPDX-License-Identifier:`` with whitespace following the colon 3. An SPDX license ID (e.g., ``Apache-2.0``) or SPDX license expression (see below) 4. (if required) The 'end comment' characters for the applicable programming language (``*/``, ...) The identifiers for these short-form license statements come from the `SPDX License List `__. Combinations of Multiple Licenses --------------------------------- Many projects include code that is under more than one single license. In fact, many individual files may contain code that is covered by multiples licenses. The `SPDX License Expression Syntax `__ defines a few operators that can be used to construct expressions with more than one license. These are described on the following pages.