torvalds/linux SLOC report

As of 2026-09-08 (commit 5acbae5f7eb3), torvalds/linux contains 42,552,251 total lines: 32,340,337 code, 4,865,053 comments, 5,346,861 blank, across 89,139 files in 50 languages (top: C 60.8%). Counted with tokei via OctoCounts.

As of 2026-09-08 (commit 5acbae5f7eb3), torvalds/linux contains 42,552,251 total lines: 32,340,337 code, 4,865,053 comments, 5,346,861 blank, across 89,139 files in 50 languages (top: C 60.8%). Counted with tokei via OctoCounts.

OctoCounts produced this report by resolving torvalds/linux to commit 5acbae5f7eb3, downloading the repository source archive, and counting every source file with tokei, the open-source line counter written in Rust. The table below breaks the count down by programming language into files, total lines, code lines, comment lines, and blank lines, so the figures can be compared across languages and projects. Results are cached by commit, tokei version, and analysis options, so counting the same revision again reproduces exactly these numbers.

Repository size insights

This is a very large codebase by counted code lines. Code represents 76.0% of all lines, comments represent 11.4%, and the repository averages 363 code lines per file. C accounts for 60.8% of counted code.

LanguageFilesLinesCodeCommentsBlanks
C36772263881321966275029230313802351
C Header270321071487383136061604758796509
Device Tree64612153169176934293832289995
ReStructuredText40468335956328700200725
JSON104461271361271102
YAML57906633115414442443097437
GNU Style Assembly13243706272698465687243909
Shell10632109771467712666737539
Rust488128260977221424616292
Python39011534390295720517843
Makefile317387412607611357913072
SVG875750356094131198

Top language (C 60.8%). Generated at 2026-09-08T17:21:01.452644260+00:00.

Report FAQ

How many lines of code does torvalds/linux have?

torvalds/linux has 42,552,251 total lines, including 32,340,337 code lines, 4,865,053 comment lines, and 5,346,861 blank lines.

How was the torvalds/linux line count measured?

OctoCounts resolved the public GitHub repository to commit 5acbae5f7eb3, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.

What commit was counted for torvalds/linux?

This OctoCounts report was generated from master at commit 5acbae5f7eb3 on 2026-09-08T17:21:01.452644260+00:00.

Similar repository reports

Other public repositories with an OctoCounts report, ranked by top language and code size similarity: