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.
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.
| Language | Files | Lines | Code | Comments | Blanks |
|---|---|---|---|---|---|
| C | 36772 | 26388132 | 19662750 | 2923031 | 3802351 |
| C Header | 27032 | 10714873 | 8313606 | 1604758 | 796509 |
| Device Tree | 6461 | 2153169 | 1769342 | 93832 | 289995 |
| ReStructuredText | 4046 | 833595 | 632870 | 0 | 200725 |
| JSON | 1044 | 612713 | 612711 | 0 | 2 |
| YAML | 5790 | 663311 | 541444 | 24430 | 97437 |
| GNU Style Assembly | 1324 | 370627 | 269846 | 56872 | 43909 |
| Shell | 1063 | 210977 | 146771 | 26667 | 37539 |
| Rust | 488 | 128260 | 97722 | 14246 | 16292 |
| Python | 390 | 115343 | 90295 | 7205 | 17843 |
| Makefile | 3173 | 87412 | 60761 | 13579 | 13072 |
| SVG | 87 | 57503 | 56094 | 1311 | 98 |
Top language (C 60.8%). Generated at 2026-09-08T17:21:01.452644260+00:00.
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.
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.
This OctoCounts report was generated from master at commit 5acbae5f7eb3 on 2026-09-08T17:21:01.452644260+00:00.
Other public repositories with an OctoCounts report, ranked by top language and code size similarity: