# torvalds/linux SLOC report

> torvalds/linux: 32,479,330 code lines at commit 3ac032ef6ca8, counted with tokei-14.0.0 on 2026-10-23. Saved result 898ecd98a86a05e3d5d5fff362867ccb262cf6da934b2c06a838a21c62406ab4.

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.

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.

## 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.7% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| C | 36,864 | 26,461,864 | 19,714,879 | 2,934,171 | 3,812,814 |
| C Header | 27,063 | 10,726,561 | 8,321,395 | 1,607,497 | 797,669 |
| Device Tree | 6,632 | 2,226,817 | 1,828,814 | 96,174 | 301,829 |
| ReStructuredText | 4,071 | 842,422 | 639,505 | 0 | 202,917 |
| JSON | 1,047 | 613,720 | 613,718 | 0 | 2 |
| YAML | 5,827 | 667,680 | 545,012 | 24,577 | 98,091 |
| GNU Style Assembly | 1,323 | 369,787 | 269,153 | 56,759 | 43,875 |
| Shell | 1,063 | 211,418 | 147,126 | 26,702 | 37,590 |
| Rust | 531 | 138,564 | 105,320 | 15,890 | 17,354 |
| Python | 393 | 115,818 | 90,691 | 7,224 | 17,903 |
| Makefile | 3,183 | 88,318 | 61,480 | 13,638 | 13,200 |
| SVG | 87 | 57,503 | 56,094 | 1,311 | 98 |
| Perl | 57 | 43,044 | 33,753 | 4,003 | 5,288 |
| XML | 32 | 26,273 | 23,576 | 1,452 | 1,245 |
| Assembly | 11 | 5,781 | 5,445 | 0 | 336 |
| Happy | 10 | 6,019 | 5,296 | 0 | 723 |
| PO File | 7 | 6,711 | 3,346 | 2,259 | 1,106 |
| Lex | 10 | 2,943 | 2,221 | 356 | 366 |
| BASH | 61 | 3,029 | 2,088 | 430 | 511 |
| C++ | 4 | 2,246 | 1,934 | 78 | 234 |
| AWK | 12 | 2,737 | 1,865 | 495 | 377 |
| Bazel | 69 | 1,614 | 1,286 | 52 | 276 |
| Jinja2 | 149 | 1,182 | 962 | 145 | 75 |
| Alex | 3 | 880 | 747 | 0 | 133 |
| ASN.1 | 15 | 656 | 441 | 87 | 128 |
| LD Script | 13 | 552 | 427 | 40 | 85 |
| Autoconf | 6 | 459 | 395 | 30 | 34 |
| Unreal Script | 5 | 618 | 371 | 156 | 91 |
| Forge Config | 15 | 1,352 | 321 | 744 | 287 |
| CSS | 4 | 416 | 244 | 101 | 71 |
| RPM Specfile | 1 | 226 | 179 | 18 | 29 |
| HEX | 2 | 173 | 173 | 0 | 0 |
| TeX | 1 | 234 | 155 | 73 | 6 |
| SWIG | 1 | 252 | 154 | 27 | 71 |
| Module-Definition | 2 | 157 | 137 | 0 | 20 |
| Snakemake | 5 | 162 | 134 | 13 | 15 |
| XSL | 10 | 200 | 122 | 52 | 26 |
| Pacman's makepkg | 1 | 134 | 91 | 13 | 30 |
| Objective-C | 1 | 89 | 72 | 0 | 17 |
| C++ Header | 2 | 125 | 59 | 55 | 11 |
| Vim Script | 1 | 42 | 33 | 6 | 3 |
| HTML | 2 | 29 | 25 | 0 | 4 |
| Ruby | 1 | 29 | 25 | 0 | 4 |
| Automake | 3 | 31 | 23 | 3 | 5 |
| TOML | 1 | 24 | 21 | 0 | 3 |
| Apache Velocity | 1 | 15 | 15 | 0 | 0 |
| Bitbake | 3 | 13 | 4 | 6 | 3 |
| INI | 1 | 6 | 3 | 2 | 1 |
| Markdown | 9 | 534 | 0 | 385 | 149 |
| Plain Text | 925 | 106,734 | 0 | 87,429 | 19,305 |

Top language (C 60.7%). Generated at 2026-10-23T00:33:40.484168596Z. Canonical report: https://octocounts.com/github/torvalds/linux/commit/3ac032ef6ca8e47bb06d1e189dfcf88fa0a09c75?reportId=898ecd98a86a05e3d5d5fff362867ccb262cf6da934b2c06a838a21c62406ab4&analysis=%7B%22profile%22%3A%22default%22%2C%22ignoredDirs%22%3A%5B%5D%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22ignoredLanguages%22%3A%5B%5D%2C%22includeGenerated%22%3Afalse%7D

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/torvalds/linux/commit/3ac032ef6ca8e47bb06d1e189dfcf88fa0a09c75?reportId=898ecd98a86a05e3d5d5fff362867ccb262cf6da934b2c06a838a21c62406ab4&analysis=%7B%22profile%22%3A%22default%22%2C%22ignoredDirs%22%3A%5B%5D%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22ignoredLanguages%22%3A%5B%5D%2C%22includeGenerated%22%3Afalse%7D).

## Report FAQ

### How many lines of code does torvalds/linux have?

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.

### How was the torvalds/linux line count measured?

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.

### What commit was counted for torvalds/linux?

This OctoCounts report was generated from master at commit 3ac032ef6ca8 on 2026-10-23T00:33:40.484168596Z.

## Similar repository reports

- [ARARAT33/AWEOS](https://octocounts.com/github/ARARAT33/AWEOS) — C, 32,335,471 code lines
- [Maccraft123/linux-duet](https://octocounts.com/github/Maccraft123/linux-duet) — C, 21,512,207 code lines
- [VirtualBox/virtualbox](https://octocounts.com/github/VirtualBox/virtualbox) — C, 16,046,794 code lines
- [DeusData/codebase-memory-mcp](https://octocounts.com/github/DeusData/codebase-memory-mcp) — C, 14,213,991 code lines
- [gcc-mirror/gcc](https://octocounts.com/github/gcc-mirror/gcc) — C, 11,341,719 code lines
- [reactos/reactos](https://octocounts.com/github/reactos/reactos) — C, 7,814,514 code lines

## Related OctoCounts pages

- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Neovim vs VS Code](https://octocounts.com/compare/neovim-vs-vscode)
- [MongoDB vs PostgreSQL](https://octocounts.com/compare/mongodb-vs-postgres)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [OctoCounts API docs](https://octocounts.com/docs/api)
