Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I look in /proc/cpuinfo, one of the lines tells me I have 6144 KB of cache. Is this L1 cache, L2 cache, or the sum of both of them?

In any case, how do I find out how much L1 and L2 cache my system has?

share|improve this question
up vote 4 down vote accepted

That is L2 Cache. 6144KB is actually 6MB. You can easily check it on the Wiki or on CPU manufacturer's page.

share|improve this answer

Use lscpu. It's in Debian package “util-linux”.

share|improve this answer
And if we are not running Debian? – Karlson Dec 28 '11 at 19:51
@Karlson: use your package manager to get that package. It is pretty widespread. – Mat Dec 28 '11 at 20:03
@Mat Assuming of course that the distribution you're running is new enough to have it and secondly that you have root or sudo permissions on the system to install it. – Karlson Dec 28 '11 at 20:07
lscpu has existed since 2008 according to its copyright info in the source code, util-linux has been around since at least 2006. lscpu only depends on libc and the dynamic linker. If you don't have root (and can't build the source), just extract it from a binary package for a reasonably similar distro and chances are it'll work. Sure there are other options, but that's a pretty good answer to the question "how do I find out how much Lx cache I have?". – Mat Dec 28 '11 at 20:15
@Karlson: you can't expect answers to cover the whole range of Linux variants that have existed since Linux 0.99. This one, quite pragmatically, answers the question with a widely available tool today. It is good. (Better than saying "Check Wikipedia and your CPU manufacturer's website in my opinion.) – Mat Dec 28 '11 at 20:30

You can also use dmidecode. dmidecode -t cache should give you the info about the caches present and their individual sizes (also checkout the other options of dmidecode, a very useful tool).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.