torvalds/linux has 32,479,330 source lines of code out of 42,736,193 total lines across 89,540 files, counted from the master ref at commit 3ac032ef6ca8 by the OctoCounts tokei engine on 2026-10-23. The report is cached by commit, tokei version, and analysis options, so recounting the same revision returns exactly these numbers.
As of 2026-10-23 (commit 3ac032ef6ca8), torvalds/linux contains 42,736,193 total lines: 32,479,330 code, 4,882,453 comments, 5,374,410 blank, across 89,540 files in 50 languages (top: C 60.7%). Custom configuration (tests excluded, docs excluded, generated excluded). Counted with tokei via OctoCounts.
OctoCounts produced this report by resolving torvalds/linux to commit 3ac032ef6ca8, 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.7% of counted code.
| Language | Files | Lines | Code | Comments | Blanks |
|---|---|---|---|---|---|
| C | 36864 | 26461864 | 19714879 | 2934171 | 3812814 |
| C Header | 27063 | 10726561 | 8321395 | 1607497 | 797669 |
| Device Tree | 6632 | 2226817 | 1828814 | 96174 | 301829 |
| ReStructuredText | 4071 | 842422 | 639505 | 0 | 202917 |
| JSON | 1047 | 613720 | 613718 | 0 | 2 |
| YAML | 5827 | 667680 | 545012 | 24577 | 98091 |
| GNU Style Assembly | 1323 | 369787 | 269153 | 56759 | 43875 |
| Shell | 1063 | 211418 | 147126 | 26702 | 37590 |
| Rust | 531 | 138564 | 105320 | 15890 | 17354 |
| Python | 393 | 115818 | 90691 | 7224 | 17903 |
| Makefile | 3183 | 88318 | 61480 | 13638 | 13200 |
| SVG | 87 | 57503 | 56094 | 1311 | 98 |
Top language (C 60.7%). Generated at .
torvalds/linux has 42,736,193 total lines, including 32,479,330 code lines, 4,882,453 comment lines, and 5,374,410 blank lines.
OctoCounts resolved the public GitHub repository to commit 3ac032ef6ca8, 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 3ac032ef6ca8 on 2026-10-23T00:33:40.484168596+00:00.
Other public repositories with an OctoCounts report, ranked by top language and code size similarity:
Play the growth animation for torvalds/linux on this page — 32,479,330 code lines across 12 languages, counted by tokei.