# torvalds/linux SLOC report

> As of 2026-10-06 (commit 69f80fef3153), torvalds/linux contains 42,571,167 total lines: 32,353,909 code, 4,868,151 comments, 5,349,107 blank, across 89,158 files in 50 languages (top: C 60.8%). Custom configuration (tests excluded, docs excluded, generated excluded). Counted with tokei via OctoCounts.

torvalds/linux has 32,353,909 source lines of code out of 42,571,167 total lines across 89,158 files, counted from the master ref at commit 69f80fef3153 by the OctoCounts tokei engine on 2026-10-06. 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 69f80fef3153, 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.8% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| C | 36,788 | 26,404,196 | 19,674,024 | 2,925,796 | 3,804,376 |
| C Header | 27,032 | 10,715,918 | 8,314,227 | 1,605,069 | 796,622 |
| Device Tree | 6,461 | 2,153,393 | 1,769,535 | 93,850 | 290,008 |
| ReStructuredText | 4,046 | 833,690 | 632,948 | 0 | 200,742 |
| JSON | 1,047 | 613,674 | 613,672 | 0 | 2 |
| YAML | 5,790 | 663,337 | 541,468 | 24,432 | 97,437 |
| GNU Style Assembly | 1,324 | 370,632 | 269,852 | 56,872 | 43,908 |
| Shell | 1,063 | 211,100 | 146,866 | 26,671 | 37,563 |
| Rust | 488 | 128,329 | 97,772 | 14,254 | 16,303 |
| Python | 391 | 115,658 | 90,548 | 7,219 | 17,891 |
| Makefile | 3,172 | 87,426 | 60,774 | 13,580 | 13,072 |
| SVG | 87 | 57,503 | 56,094 | 1,311 | 98 |

Top language (C 60.8%). Generated at 2026-10-06T17:55:53.644579890+00:00. Canonical report: https://octocounts.com/github/torvalds/linux

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/torvalds/linux/commit/69f80fef3153299d9c72c53d1d71eef6354b6926?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).

## Report FAQ

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

torvalds/linux has 42,571,167 total lines, including 32,353,909 code lines, 4,868,151 comment lines, and 5,349,107 blank lines.

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

OctoCounts resolved the public GitHub repository to commit 69f80fef3153, 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 69f80fef3153 on 2026-10-06T17:55:53.644579890+00:00.

## Similar repository reports

- [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,045,668 code lines
- [DeusData/codebase-memory-mcp](https://octocounts.com/github/DeusData/codebase-memory-mcp) — C, 13,623,057 code lines
- [gcc-mirror/gcc](https://octocounts.com/github/gcc-mirror/gcc) — C, 11,326,916 code lines
- [reactos/reactos](https://octocounts.com/github/reactos/reactos) — C, 7,769,873 code lines
- [gnutools/binutils-gdb](https://octocounts.com/github/gnutools/binutils-gdb) — C, 7,014,784 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)
