# torvalds/linux SLOC report

> As of 2026-11-10 (commit b3dfbde62cf1), torvalds/linux contains 43,214,207 total lines: 32,866,866 code, 4,934,199 comments, 5,413,142 blank, across 90,074 files in 51 languages (top language: C 60.5%). Canonical public options (tests, docs and generated files excluded). Counted with tokei via OctoCounts.

torvalds/linux has 32,866,866 source lines of code out of 43,214,207 total lines across 90,074 files, counted with tokei from the master ref at commit b3dfbde62cf1 on November 10, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

OctoCounts produced this report by resolving torvalds/linux to commit b3dfbde62cf1, 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,143 | 26,688,723 | 19,884,183 | 2,963,006 | 3,841,534 |
| C Header | 27,147 | 10,934,706 | 8,501,097 | 1,632,153 | 801,456 |
| Device Tree | 6,642 | 2,227,286 | 1,829,191 | 96,190 | 301,905 |
| ReStructuredText | 4,102 | 849,821 | 645,243 | 0 | 204,578 |
| JSON | 1,047 | 616,321 | 616,319 | 0 | 2 |
| YAML | 5,972 | 688,415 | 562,034 | 25,226 | 101,155 |
| GNU Style Assembly | 1,323 | 368,875 | 268,357 | 56,761 | 43,757 |
| Shell | 1,066 | 214,203 | 149,114 | 27,040 | 38,049 |
| Rust | 560 | 144,647 | 109,986 | 16,390 | 18,271 |
| Python | 407 | 124,699 | 98,540 | 7,179 | 18,980 |
| Makefile | 3,200 | 88,481 | 61,471 | 13,723 | 13,287 |
| SVG | 87 | 57,503 | 56,094 | 1,311 | 98 |

Top language: C 60.5%. Generated on November 10, 2026. Canonical report: https://octocounts.com/github/torvalds/linux

## Reproduce this report

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

## Report FAQ

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

torvalds/linux has 32,866,866 lines of code, plus 4,934,199 comment lines and 5,413,142 blank lines, for 43,214,207 total lines at commit b3dfbde62cf1 on November 10, 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 b3dfbde62cf1, 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 b3dfbde62cf1 on November 10, 2026.

## Similar repository reports

- [ARARAT33/AWEOS](https://octocounts.com/github/ARARAT33/AWEOS) — C, 32,335,471 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,710,005 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,227,916 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)
