license
Display software license information
TLDR
Print a license to stdout, using the defaults (auto-detected author name, and current year)
Generate a license and save it to a file
List all available licenses
Generate a license with custom author name and year
SYNOPSIS
license [options] file...
PARAMETERS
-h, --help
Display help message and exit.
-V, --version
Display version information and exit.
-c, --classify
Only classify licenses, don't display full text.
file...
The file(s) to analyze for license information.
DESCRIPTION
The license command attempts to determine and display the software license(s) under which a given program or file is distributed. It works by searching for common license texts or indicators within the specified file or executable and consulting a database of known licenses. This is useful for understanding the terms of use for software you are using. Often, software distributions include licenses as standalone files (e.g., LICENSE, COPYING) or embedded within the program's source code or binary.
The command does not guarantee accurate results, as license detection can be complex and ambiguous, especially if the license is non-standard or heavily modified. Relying solely on the output of license is not a substitute for careful review of the software's official license documentation. It's a helpful tool for a quick assessment, but should be considered a starting point rather than a definitive answer.
The command primarily helps users to be aware of the license and understand what usage it is allowed and what is disallowed.
CAVEATS
The accuracy of license detection depends on the quality of the license database and the clarity of the license information embedded in the target file. It may fail to detect licenses correctly for obfuscated or highly customized software.
EXIT STATUS
The license command exits with a status of 0 if it successfully identifies the license of the file and 1 if any errors occur.
HISTORY
The license command is a relatively recent addition to some Linux distributions and may not be available on all systems. It's designed to address the growing need for easy license identification in the open-source ecosystem. The command's database of known licenses is continuously updated to improve accuracy and coverage. The goal of the program is to provide easy and simple access to license information for software.