Check a file for syntax and style problems.
Section: Validate and inspect YAML from the terminal
Lint a YAML file
bash
bash
yamllint config.yamlExplanation
`yamllint` is a standard first pass for catching indentation, trailing spaces, duplicate keys, and other issues.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Validate and inspect YAML from the terminal
Parse YAML with Python
Quickly verify that a YAML file loads successfully.
Pretty-print YAML with yq
Read and normalize YAML output from the command line.
Validate Kubernetes YAML client-side
Check whether a manifest parses before applying it.