How to Mine Zcash on Your Linux Machine

Zcash was launched on October 28, 2016 and people are now able to mine Zcash. In this Zcash mining guide we are going to look at how to mine Zcash on Linux, including Debian, Ubuntu, Linux Mint, Elementary OS.

Zcash is a new cryptocurrency that promises better privacy and full anonymity for users. Unlike Bitcoin, Zcash transaction info (the sender, recipient, and value of all transactions on the blockchain) is encrypted and can’t be viewed unless you have the view key.

The official Zcash client is currently available as a command-line tool for Linux only.

Prerequisites

  • You are comfortable with Linux command line.
  • You have at least 4GB of RAM on your computer
  • A 64-bit Debian-based Linux distribution.

Install Zcash on Debian, Ubuntu, Linux Mint, Elementar OS from Zcash repository

Fire up a terminal window (CTRL+ALT+T), then open the sources.list file.

sudo nano /etc/apt/sources.list

Paste the following line to the end of the file.

deb [arch=amd64] https://apt.z.cash/ jessie main

Save and close the file. Then import Zcash signing key to your system using the following command.

wget -qO - https://apt.z.cash/zcash.asc | sudo apt-key add -

You should see an OK message which indicates that the import is successful. Since Zcash repository uses https protocol, we need to install the apt-transport-https package so that APT can talk to Zcash repository in https.

sudo apt install apt-transport-https

Now update local package index and install Zcash.

sudo apt update

sudo apt install zcash

Setting up Zcash

Once it’s installed, run the following command to fetch the zero-knowledge parameters. The params directory will be created at ~/.zcash-params.

zcash-fetch-params

Once the download is complete, we also need to create a config file before running Zcash. Create the config directory under your home directory with:

mkdir ~/.zcash

Then run the folllowing 3 command to create the ~/.zcash/zcash.conf file. Replace username with your preferred username.

echo "addnode=mainnet.z.cash" >~/.zcash/zcash.conf
echo "rpcuser=username" >>~/.zcash/zcash.conf
echo "rpcpassword=`head -c 32 /dev/urandom | base64`" >>~/.zcash/zcash.conf

If you want to enable CPU mining, then run the following 2 commands:

echo 'gen=1' >> ~/.zcash/zcash.conf

echo "genproclimit=$(nproc)" >> ~/.zcash/zcash.conf

Now start the Zcash daemon:

zcashd
zcash

zcashd running on Ubuntu 16.04

Now your Zcash mining node is up and running. To let it run in the background, add --daemon flag.

zcashd --daemon

You can use the zcash-cli client to get information on your node like below.

zcash-cli getinfo

To stop mining, run

zcash-cli stop

For more info on the usage of zcashd and zcash-cli, check out the man pages.

man zcashd

man zcash-cli

It’s worth mentioning that Equihash, a memory-oriented Proof-of-Work,  is used for block mining in Zcash which means how much mining you can do is mostly determined by how much RAM you have.

That’s it!

I hope this how to mine Zcash guide helped you. As always, if you found this post useful, then Subscribe to our free newsletter to get latest Linux tutorials. You can also follow us on Google+Twitter or like our Facebook page.

Rate this tutorial
[Total: 29 Average: 4]

6 Responses to “How to Mine Zcash on Your Linux Machine

  • How do I setup the same account on more than one computer?
    I always have a system running, just not always the same one and I just don’t like having a computer without working on it.

  • How do I transfer an account between computers / Linux installations?
    It’s blatant obvious from my questions that I am not an experienced Linux user.

  • Dr. Romar Rochet
    6 years ago

    How do I know what address the mining is funding? How do I delineate the proper Zcash address? I have Zcash address for OS X. Thanks to you I was able to get the miner working on Linux Mint 18.

  • Daniel Stinebaugh
    6 years ago

    Wish there was a way to change the location of the downloaded blocks, but super handy guide! Thanks!

  • How do I know what address the mining is funding? How do I delineate the proper Zcash address?

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here