Skip to content

C/C++

Installs: gcc, g++, clang, lld, gdb, cmake, ninja, make, ccache, …. Toolchain id: cpp.

Preview the install with the default options. This prints every script it would run and changes nothing:

Terminal
npx linux-toolchain --only cpp --defaults --dry-run

Set an option with --opt instead of its default:

Terminal
npx linux-toolchain --only cpp --opt cpp.compilers=gcc --defaults --dry-run

Remove --dry-run to install for real. Without --defaults, the options below are asked interactively. bunx linux-toolchain takes the same arguments.

Set with --opt cpp.<key>=<value>. Multi options take a comma list (an empty value means none); yes/no options take true or false.

Option Kind Choices Default
cpp.compilers
Compilers
multi (comma list) gcc GCC (gcc, g++, gdb)
clang Clang/LLVM (clang, clangd, lld, lldb)
gcc,clang
cpp.build
Build systems
multi (comma list) cmake-ninja CMake + Ninja
meson Meson
make Make
cmake-ninja,meson,make
cpp.addons
Add-ons
multi (comma list) see Add-ons cppcheck

Chosen in the add-ons step or with --opt cpp.addons=.... Recommended add-ons are pre-checked and installed with --defaults. A failed add-on is reported as a warning; the toolchain itself still succeeds.

  • cppcheck (apt) Default.
  • conan (uv tool install)
  • vcpkg (~/.vcpkg)

Back to the toolchain reference. Run npx linux-toolchain list to print the catalog of the version you have.