#cpumining
Table/Blog/How to Mine Monero on a CPU: A Beginner's Guide

How to Mine Monero on a CPU: A Beginner's Guide

Tested on Ubuntu 24.04

Who this guide is for

You've never mined before and just want to try it on your own computer without drowning in jargon. This guide is for you. First we'll explain, in plain words, what mining, a miner, a pool, and a wallet are and why you need them. Then we'll start real Monero mining in five steps.

If the basics already feel familiar and you'd rather dive straight into hardware choice, huge pages, and fine-tuning, take a look at How to Start CPU Mining Monero — it's written for those already up to speed. Here, we take it slow.

Everything was verified live on June 16, 2026, on Ubuntu 24.04 (AMD Ryzen 9 5900X), xmrig 6.26.0: the miner connected to the pool and the pool accepted shares (the first one ~13 seconds after start). The commands are written to be version-independent and keep working with future builds.

Honest upfront: mining Monero on a CPU is not a way to get rich. On a typical CPU you earn a few cents a day, and after electricity the net is often negative. It's interesting as an experiment, a way to learn the technology, or a use for idle hardware. Real numbers for your electricity rate are on the Monero coin page and the profitability table.

How mining works (in plain words)

Monero, like any cryptocurrency, is a shared "ledger" (the blockchain) that records every transfer. The ledger doesn't live on one server — thousands of computers worldwide keep a copy. So the question is: who gets to add new pages to it, and by what right?

Here's how it works:

  1. New transfers are grouped into a block — the next "page" of the ledger.
  2. To get a block accepted, you must solve a hard puzzle: your computer tries an enormous number of values until it hits one that fits. There's no shortcut — only guessing.
  3. One such guess-attempt is called a hash. How many attempts your CPU makes per second is your hashrate (e.g. 12,500 H/s = 12,500 attempts per second).
  4. Whoever guesses first adds the block to the ledger and gets the reward: newly created Monero plus the fees from the transfers in that block.

This guessing process is mining. Monero's puzzle is built on an algorithm called RandomX, designed so that ordinary CPUs are the best tool for it (not GPUs or specialized ASIC machines). That's why you can mine Monero on hardware you already own.

The three things you need

To mine, you need three simple things. Let's go through each.

1. A miner (this is software)

A miner is just a program. It makes your CPU churn through those guesses (compute hashes) and sends the results where they need to go. The CPU on its own doesn't "know how" to mine — the miner program is what does the work.

For Monero, the standard miner is xmrig. It's free and open source. That's what we'll install.

Monero needs xmrig specifically (or an equivalent that understands RandomX). Miners for other coins won't work.

2. A pool (a team of miners)

Remember, only the one who solves the puzzle first gets the reward. On your own, your CPU against the whole global network would almost never win — you'd find a block once every few thousand years on average. That's solo mining, and for a regular person it's pointless.

The solution is a pool. It's a server that combines thousands of miners into one team:

  • Everyone hammers the puzzle together, pooling their power.
  • When anyone on the team finds a block, the reward is split in proportion to the work each contributed.
  • To measure your contribution, the pool hands out easier sub-puzzles. Each accepted solution to one is a share. The more shares you submit, the bigger your slice of the reward.

When you see accepted in the miner's log, that's the pool crediting your share. Accepted shares are exactly what you get paid for. In this guide we use the popular public pool supportxmr.com.

3. A wallet and an address (where the money goes)

The pool needs to know where to send your slice. For that you need a Monero wallet address — a long string of letters and numbers (it starts with 4), like an account number. You give this address to the miner, and the pool accumulates your earnings on it.

Where to get an address:

  • Your own wallet (the right way). Download the official Monero wallet (GUI), create a new wallet, and it will show your address. Crucially, save the secret 25-word mnemonic seed somewhere safe — it's the only way to recover access to your funds. Never share it.
  • An exchange address (where Monero is traded) also works as a payout destination, but a wallet fully under your control is safer.

⚠️ The address must be valid. Unlike some coins, a Monero pool only accepts a real Monero address (a long string starting with 4). You can't just "make up a name" here.

What hardware you need

  • A CPU — any modern AMD or Intel. More cores and more L3 cache means a higher hashrate.
  • RAM — at least 4 GB, and it must be dual-channel (two sticks, not one). RandomX keeps a ~2.3 GB table in memory; on a single memory channel the hashrate drops by nearly half. This is the most common beginner mistake.
  • OS — Linux or Windows. The commands below are for Linux (verified live); on Windows it's the same, with differences noted.
  • A Monero wallet address — from the step above.

🌡️ Cooling. While mining, the CPU runs at 100% and gets hot (around 80 °C on our test machine). That's a normal working temperature, but the cooler must be in good shape: on overheat the CPU will throttle or shut itself off. On Linux, watch the temperature with sensors (the lm-sensors package): sudo apt install -y lm-sensors && sensors. Avoid mining on a laptop — its cooling isn't built for round-the-clock full load.

Step 1. Get a wallet address

Create a Monero wallet (see "A wallet and an address" above) and copy your address — the long string starting with 4. You'll need it in step 3.

Save the 25-word secret seed. Without it, recovering access to your funds is impossible.

Step 2. Download the xmrig miner

xmrig is a free miner with open builds on GitHub.

If you have a minimal Linux install (a bare server), first install the utilities this guide uses. On a normal desktop Ubuntu they're already present, so you can skip this:

sudo apt update && sudo apt install -y curl ca-certificates tar

Linux. These commands find the latest release and download it automatically — copy the whole block:

# 1. Find the link to the latest Linux build and download it
URL=$(curl -s https://api.github.com/repos/xmrig/xmrig/releases/latest \
  | grep -oE '"browser_download_url":"[^"]+"' \
  | sed 's/"browser_download_url":"//; s/"$//' \
  | grep -- '-linux-static-x64.tar.gz' | head -1)
curl -sL -o xmrig.tar.gz "$URL"

# 2. Extract and enter the extracted folder
tar xzf xmrig.tar.gz
cd xmrig-*/

💡 Why this instead of a direct link: the xmrig archive name contains the version number (xmrig-6.26.0-...), so a hard-coded link would break when a new version ships. Here the version is never typed by hand — the commands find it themselves. The downloaded file is already executable; no chmod needed.

Windows: on the releases page, download the latest xmrig-*-msvc-win64.zip and unzip it. You'll run xmrig.exe, and write the step 3 command on one line (see the one-line version below).

⚠️ Antivirus may delete the miner. Windows Defender and antivirus tools often flag any miner as a threat and delete the file. This is a well-known false positive common to all miners. To let it run, add the miner's folder to your antivirus exclusions.

Step 3. Start mining

Replace YOUR_ADDRESS with your wallet address and run:

./xmrig -o pool.supportxmr.com:3333 -u YOUR_ADDRESS -p rig1

It's already a single line (on Windows use xmrig.exe instead of ./xmrig).

Breaking the command down:

  • -o pool.supportxmr.com:3333 — the pool server address and port. supportxmr is a large public Monero pool.
  • -u YOUR_ADDRESS — your Monero wallet address from step 1. The pool accumulates your earnings here.
  • -p rig1 — a label for this machine (anything, in Latin letters). Handy if you run several machines so you can tell them apart in the stats.

xmrig picks the thread count automatically — you don't need to specify anything.

Step 4. Confirm it's working

In the first few seconds, xmrig detects your CPU and connects to the pool. The key lines you want to see:

 * POOL #1      pool.supportxmr.com:3333 algo auto
 cpu      use profile  rx  (24 threads)
 cpu      READY threads 24/24 ...
 net      use pool pool.supportxmr.com:3333
 net      new job from pool.supportxmr.com:3333 diff 75000 algo rx/0

new job from ... means the pool gave you a task — you're already mining. Every few seconds xmrig prints your current speed:

 miner    speed 10s/60s/15m 12512.1 n/a n/a H/s

That's your hashrate (~12,500 H/s on a Ryzen 9 5900X here). And here's the final confirmation that the pool is crediting your work:

 cpu      accepted (1/0) diff 75000 (199 ms)
 cpu      accepted (2/0) diff 225008 (205 ms)

accepted (1/0) — the first share was accepted, with zero rejected. That means everything is set up correctly and you're already earning a slice. In our test the first share arrived after ~13 seconds (supportxmr deliberately starts at an easy difficulty). On a slower CPU the first share can take a minute or two — that's normal.

Step 5 (Linux). Run with sudo for more hashrate, for free

If you run the miner as a regular user, the log warns that some optimizations are unavailable. Two things speed up RandomX a lot — huge pages (large memory pages) and MSR tweaks (fine-tuning CPU registers). To enable them, run the same command with sudo:

sudo ./xmrig -o pool.supportxmr.com:3333 -u YOUR_ADDRESS -p rig1

Then the log will show:

 msr      register values for "ryzen_19h" preset have been set successfully
 randomx  allocated 2336 MB (2080+256) huge pages 100% 1168/1168 +JIT
 cpu      READY threads 24/24 (24) huge pages 100% 24/24

huge pages 100% and msr ... set successfully mean the optimizations kicked in. On AMD Ryzen the gain is noticeable; on Intel it's smaller. On Windows, run xmrig.exe as administrator for the same effect.

Keep mining in the background (so it doesn't stop)

If you start the miner the normal way, it stops as soon as you close the terminal or log out over SSH. To keep it running in the background:

# start in the background, writing the log to a file
sudo ./xmrig -o pool.supportxmr.com:3333 -u YOUR_ADDRESS -p rig1 --log-file=miner.log &

# check it's going (connection and accepted shares):
grep -E "use pool|accepted" miner.log

# stop the miner:
sudo pkill -f xmrig

To watch the live hashrate in real time, screen or tmux is handier (sudo apt install -y screen): start the miner inside screen, detach with Ctrl+A then D, and come back with screen -r. For auto-start after a reboot, set up a systemd service.

When you get paid

The pool accumulates your earnings and pays them out to your wallet address once they reach a minimum amount (the payout threshold). On a modest CPU hashrate it takes a while to build up — that's normal. Check your current balance, hashrate, and payout threshold in the pool dashboard: at supportxmr.com, paste your address into the worker lookup field.

How much you can earn (honestly)

  • Hashrate. Our Ryzen 9 5900X does ~12,500 H/s. What your CPU does — see the profitability table or your CPU's page.
  • The income is modest. On a typical CPU it's a few cents a day. After electricity, the net is often negative — meaning you're paying to mine.
  • Count net income, not gross. Many calculators show income before electricity — a flattering picture. Only net income (earnings minus electricity) actually matters. For your rate, the Monero page and profitability table show it.

💰 Is it worth it? If electricity is expensive — almost certainly not, you'll be in the red. If it's cheap or free (solar panels, included in rent, an idle server) — you can stay slightly in the black. Before leaving the miner running long-term, do the math for your own rate.

Common beginner mistakes

  1. A single RAM stick (single channel). The most common and most expensive mistake: the hashrate drops by nearly half. Always use two sticks (dual-channel mode).
  2. The wrong miner. Monero needs xmrig (or another miner with RandomX support). Miners for other coins/algorithms won't work.
  3. Mining on a laptop. Overheating, throttling, and risk of damaging the machine. Don't.
  4. An invalid wallet address. The pool only accepts a real Monero address (starts with 4). Make sure you copied it in full.
  5. Looking at gross income. Always count net income — with electricity included.
  6. Running without sudo on Linux. Without it, huge pages and MSR don't engage — you lose hashrate for free.

Recap

  1. Create a Monero wallet and copy the address (starts with 4); save the secret seed.
  2. Download xmrig (step 2).
  3. Run the command from step 3 with your address.
  4. Wait for the accepted line — that means it's working.
  5. On Linux, add sudo for more hashrate.

Don't expect big money — on a CPU this is more of an experiment and a way to learn the technology. If you want to squeeze the most out of your processor, compare coins in our profitability table — it calculates with realistic, not idealized, numbers. And to pick a CPU for Monero, see Best CPUs for Mining Monero.

Related articles