How to Mine Ethereum on Ubuntu 16.04/20.04

mine ethereum linux

As of recently, a cryptocurrency craze has swept Internet communities. The people have found out that one does not need several thousand dollar-worth rig to mine cryptocurrency with a profit. Stores are short on graphics cards, and a gold fever has overtaken the miners. If you have a card with more than 2GB of VRAM, you too can attempt mining. Let’s take a look at the most common mining avenue – Ethereum.

Ethereum is considered to be a great coin to mine, with high potential profits. To mine Ethereum, you need a piece of software called 'ethminer', which is a command-line tool. It can be run on multiple Linux distributions, but in this article, we will focus on Ubuntu 16.0.4/20.04 and Debian 8.

Before we begin – in order to not waste your time, do not attempt mining with a card under 2GB of VRAM, as it’s unlikely it will be detected by the software and be able to mine anything. On top of that, if you are using a Nvidia card, you must use the proprietary driver. For AMD, the AMDGPU driver works just fine.

In this guide, I will show you how to install Ethminer on Ubuntu using the terminal.

Add Ethereum Repository

First off, we need to add the Ethereum repository, so run the following commands in your terminal:

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:ethereum/ethereum
$ sudo apt-get update

If you are running Debian, the repository name needs to be replaced:

$ sudo sed ‘s/jessie/vivid/’ -i /etc/apt/sources.list.d/ethereum-ethereum-*.list

Installing Ethminer

We can finally get to installing ethminer. However, on top of that, we will need additional packages: Geth and Ethereum:

Install packages

Run the following to install the required packages:

$ sudo apt-get install ethereum geth

To use ethminer required for coin mining, we have to download it from GitHub:

At the time of writing this tutorial, the latest version was ethminer 0.19.0-alpha.0

Type the following to download and extract the binary file:

$ wget
$ mkdir ethminer
$ cd ethminer
$ tar -xzvf ../ethminer-0.19.0-alpha.0-cuda-8-linux-x86_64.tar.gz

Pick a network

There are two for Ethereum. Ethereum Classic, known as ETC, and Ethereum, known as ETH.

For a miner, the main difference is in price and difficulty of mining. The higher the difficulty, the less coins you will mine. You need to choose a coin, which will bring you the best profits. As of time of writing, ETH has a better ratio. A power of 20 megahashes will bring you $29 of profit, compared to ETC’s $15, with the same power consumption.

Choose a wallet

I’ll assume you’ll be mining ETH; thus, I suggest to use this wallet. The password you set is permanent, do not lose it, as you will lose everything you keep inside the wallet. Set it up, and then we will move onto the next point.

Solo mining or pool mining

Generally, at a low hashrate, you want to mine in a pool, because of greater rewards. It will also take you a longer time to receive profits from solo mining.

Pick a pool from this list.

There might be other pools than the one from the list – find one that you find suits you the best.

Start mining!

As stated by the application, by default, ethminer will try to use all device types it can detect. Optionally you can limit this behavior setting either of the following options:

    -G,--opencl         Mine/Benchmark using OpenCL only
    -U,--cuda           Mine/Benchmark using CUDA only

Then, execute a mining command, usually stated on the pool website.

For dwarfpool, it’s:

$ cd ./bin
$ ./ethminer -G -P

Instead of YOUR_WALLET, paste your wallet address.

The output on a RX480 card should be:

[OPENCL] Found suitable OpenCL device [Ellesmere] with 8560984064 bytes of GPU Memory

Although the byte count will depend on how much VRAM does your specific model have. And here you go! You’re now mining Ethereum on Linux.

With just a few commands, you've got a cryptocurrency miner at your disposal. Ethminer has the advantage of being free over other solutions while keeping the same speed and efficiency as proprietary software. If you would like to know more about such great Linux software, stay tuned.

5 Comments... add one

  1. ethminer is not in the referenced ppa:

    sudo apt install ethminer
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package ethminer

  2. Currently researching
    "ethminer 0.19.0-alpha.0
    Build: linux/release/gnu

    No OpenCL platforms found
    Error: No usable mining devices found

    Any advice would be appreciated !

  3. Check permissions on /dev/dri/* (opencl) or /dev/nvidia* (Cuda). For opencl, install clinfo to check whether it works.


Leave a Comment