# torvalds/linux SLOC report

> torvalds/linux: 32,877,439 code lines at commit c44104f3642d, counted with tokei-15.0.0 on 2026-11-21. Saved result 9902cad525294512d0043f43c9638d8b2b30fd806b012455963976d3869ad352.

torvalds/linux has 32,877,439 source lines of code out of 43,229,659 total lines across 90,083 files, counted with tokei from the master ref at commit c44104f3642d on November 21, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

OctoCounts produced this report by resolving torvalds/linux to commit c44104f3642d, downloading the repository source archive, and counting files selected by the effective rules 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; an exact reproduction needs the same commit, engine version, and effective counting rules.

## Counting rules and retention

torvalds/linux: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.

Saved reports remain subject to cache cleanup and replacement. Export the JSON or text for durable citation; live repository URLs can change.

## Repository size insights

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

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| C | 37,148 | 26,702,002 | 19,893,287 | 2,965,645 | 3,843,070 |
| C Header | 27,148 | 10,935,716 | 8,501,706 | 1,632,453 | 801,557 |
| Device Tree | 6,642 | 2,227,286 | 1,829,191 | 96,190 | 301,905 |
| ReStructuredText | 4,102 | 850,055 | 645,427 | 0 | 204,628 |
| JSON | 1,047 | 616,345 | 616,343 | 0 | 2 |
| YAML | 5,972 | 688,436 | 562,047 | 25,229 | 101,160 |
| GNU Style Assembly | 1,323 | 368,899 | 268,379 | 56,763 | 43,757 |
| Shell | 1,068 | 214,642 | 149,417 | 27,115 | 38,110 |
| Rust | 560 | 144,639 | 109,981 | 16,388 | 18,270 |
| Python | 408 | 125,063 | 98,797 | 7,232 | 19,034 |
| Makefile | 3,200 | 88,509 | 61,494 | 13,725 | 13,290 |
| SVG | 87 | 57,503 | 56,094 | 1,311 | 98 |
| Perl | 47 | 42,022 | 33,031 | 3,965 | 5,026 |
| XML | 32 | 26,347 | 23,632 | 1,468 | 1,247 |
| Assembly | 11 | 5,887 | 5,545 | 0 | 342 |
| Happy | 9 | 5,351 | 4,711 | 0 | 640 |
| PO File | 7 | 6,711 | 3,346 | 2,259 | 1,106 |
| Lex | 9 | 2,746 | 2,061 | 337 | 348 |
| C++ | 5 | 2,412 | 2,060 | 92 | 260 |
| AWK | 15 | 2,952 | 2,017 | 532 | 403 |
| BASH | 14 | 2,717 | 1,894 | 327 | 496 |
| Bazel | 65 | 1,576 | 1,259 | 50 | 267 |
| Jinja2 | 161 | 1,357 | 1,113 | 161 | 83 |
| Alex | 4 | 1,134 | 970 | 0 | 164 |
| 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 | 165 | 136 | 14 | 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 |
| TOML | 3 | 32 | 25 | 2 | 5 |
| Automake | 3 | 31 | 23 | 3 | 5 |
| Apache Velocity | 1 | 15 | 15 | 0 | 0 |
| CMake | 2 | 19 | 7 | 10 | 2 |
| Bitbake | 3 | 13 | 4 | 6 | 3 |
| INI | 1 | 6 | 3 | 2 | 1 |
| Markdown | 9 | 534 | 0 | 385 | 149 |
| Plain Text | 889 | 102,794 | 0 | 84,203 | 18,591 |

Top language: C 60.5%. Generated on November 21, 2026. Canonical report: https://octocounts.com/github/torvalds/linux/commit/c44104f3642da720164042623e4832836aefdd8e?reportId=9902cad525294512d0043f43c9638d8b2b30fd806b012455963976d3869ad352&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/c44104f3642da720164042623e4832836aefdd8e?reportId=9902cad525294512d0043f43c9638d8b2b30fd806b012455963976d3869ad352&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 32,877,439 lines of code, plus 4,937,269 comment lines and 5,414,951 blank lines, for 43,229,659 total lines at commit c44104f3642d on November 21, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

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

OctoCounts resolved the public GitHub repository to commit c44104f3642d, 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 c44104f3642d on November 21, 2026.

## Similar repository reports

- [ARARAT33/AWEOS](https://octocounts.com/github/ARARAT33/AWEOS) — C, 32,336,484 code lines
- [rockchip-linux/kernel](https://octocounts.com/github/rockchip-linux/kernel) — C, 28,928,529 code lines
- [freebsd/freebsd-src](https://octocounts.com/github/freebsd/freebsd-src) — C, 22,335,858 code lines
- [Maccraft123/linux-duet](https://octocounts.com/github/Maccraft123/linux-duet) — C, 21,512,207 code lines
- [openbsd/src](https://octocounts.com/github/openbsd/src) — C, 20,711,629 code lines
- [VirtualBox/virtualbox](https://octocounts.com/github/VirtualBox/virtualbox) — C, 16,046,794 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)
- [How to count lines of code in a GitHub repository](https://octocounts.com/docs/count-lines-of-code-github)
- [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)
- [All OctoCounts guides](https://octocounts.com/docs)
