How To Mine Zcash with Nvidia GPUs

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@joshmocek·
0.000 HBD
How To Mine Zcash with Nvidia GPUs
![IMG_4049.PNG](https://steemitimages.com/DQmWVt9iJBBpSDu7wFDgdAHjipQs18dmsz3rfVVQVys5EFf/IMG_4049.PNG)
Since cryptocurrencies have risen exponentially in the past few months people want in. One of the best ways to make money with currencies like Ethereum and Bitcoin is to 'mine' them. When you mine a cryptocurrency you are running a program on your computer to use your computers computing power on the network. Whenever your computer solves a piece of the puzzle, a block in the blockchain, your miner is rewarded. There are two main ways to mine:
1. Rent out miners. I will not be covering this topic today.
2. Use your computer as a miner.

<a href="https://minergate.com">
    <img src="https://minergate.com/assets/promo/728x90-1.png"/>
</a>

I will go through start to finish on how to set up a Zcash miner on Ubuntu. This is because if you are mining with an Nvidia Graphics card the windows drivers are a little wonky so you will be limiting your hashrate. For me I have 2 GTX 980ti's in my gaming computer. When I mine Ethereum on windows I get around 5 Mh/s and when I mine on Ubuntu I get 40 Mh/s. For those of you with gaming computers this can be a nice passive source of income while you aren't playing games. Also AMD GPUs tend to be better at mining Ethereum, but Nvidia GPUs are better at mining Zcash. So if you have an Nvidia GPU I would suggest to mine Zcash. I do. If you have AMD GPU's I would suggest looking at this guide [here](https://steemit.com/ethereum/@joshmocek/the-easiest-guide-to-minimg-ethereum-on-windows-and-siacoin-decred-lbry-and-pascal).
## Step 1: Make room on your PC
If you want to dual-boot and not just clean install you will need this step. Right click on the windows start menu, on the bottom left and select 'Disk Management'. Select your main HDD or SSD that you want to dual boot from, right click on it and press 'Shrink'. I suggest using at least 32gb just to be safe.
## Step 2: Install Ubuntu 14.04
You can either dual boot your computer or run a clean install. To do this you will need a USB drive. Download the Linux Live application.
[Linux Live](https://www.linuxliveusb.com/)
And you will need to download the Ubuntu 14.04 iso.
[Ubuntu 14.04 iso](http://releases.ubuntu.com/14.04/)
Once you have these downloaded open up Linux Live, select your usb you want to use and select the Ubuntu 14.04 iso you just downloaded. Then press the lightning button. Once it is done reboot your PC, and boot into the BIOS. You can usually do this by pressing F2 or F12 when the computer is booting up. Once you are here select 'Boot Menu' and select your USB drive. From here it is pretty self explanatory.
## Step 3: Get a Zcash Wallet
[Sign up here](https://www.cryptonator.com/about/zec?utm_referrer=https%3a%2f%2fwww.google.com%2f)
Once you've made this Wallet get your public address so your miner will know where to point to.
[Here](https://z.cash/download.html) is some additional info though I don't know if it is necessary. 

## Step 4: Download Nvidia Cuda
[Cuda Download](https://developer.nvidia.com/cuda-downloads)
## Step 5: Download and Install dependencies
Now I will say I know how to use Linux and I have built quite a few computers with this OS, but this is just a list of dependencies that if I run all of them I don't have any problems. Some of them might not be needed, but they won't hurt. You will want to open your terminal by pressing 'Ctrl+Alt+T', and copy and paste these lines into the terminal and press enter. To paste into the terminal you can not just press 'Ctrl+V' you need to press 'Ctrl+Shift+V'. And if for some reason you need to kill a process that is running in your terminal you need to press 'Ctrl+C'. So here are all the dependencies, this is easily the longest part of the tutorial.

First we will need to set up a root password. To do this:
sudo passwd root
Then type your desired password.
Now to sign in as root:
su
Now to install all the dependencies:

sudo add-apt-repository main
sudo add-apt-repository universe
sudo add-apt-repository restricted
sudo add-apt-repository multiverse
sudo apt-get update
sudo apt install ocl-icd-opencl-dev
sudo apt-get install libmicrohttpd-dev libssl-dev cmake build-essential
sudo apt-get install automake libtool make gcc
sudo apt-get install libjansson-dev
sudo apt-get update
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9
sudo apt-get upgrade

sudo apt-get purge nvidia-*
sudo apt-get purge nvidia-cuda*
sudo update-initramfs -u
sudo apt-get install libopenblas-dev liblapack-dev
sudo apt-get install linux-image-generic linux-image-extra-virtual
sudo apt-get install linux-source linux-headers-generic
sudo apt-get install nvidia-common nvidia-prime nvidia-settings
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-375

sudo apt-get install libglu1-mesa libxi-dev libxmu-dev -y
sudo apt-get — yes install build-essential
sudo apt-get install python-pip python-dev -y
sudo apt-get install python-numpy python-scipy -y
sudo apt-get install libglu1-mesa libxi-dev libxmu-dev libglu1-mesa-dev
sudo apt-get install apt-file && apt-file update

Now install Cuda.
Find the place you installed Cuda and navigate to it. To do this it is easiest to download it and drag it into your home folder. To do this press the file cabinet at the top left of the screen. It should open up to the desired folder. You should see icons like Desktop, Documents, Downloads, etc. Now just drag your Cuda download here.
Go back to the command prompt and put in these lines substituting your Cuda version as necessary.

sudo apt-get install build-essential
sudo chmod +x cuda_8.0.61_375.26_linux.run
./cuda_8.0.61_375.26_linux.run --driver --silent
./cuda_8.0.61_375.26_linux.run --toolkit --silent
./cuda_8.0.61_375.26_linux.run --samples --silent

Now we just have a few more dependencies to install.

sudo apt-get update

## Step 6: Download Zcash Miner for Linux
[Zcash Miner](https://bitcointalk.org/index.php?topic=1707546.0)

To do this we don't want to be a super user so in the terminal type

exit

And now we can extract the tarball.

tar -xzf ZcashMinerFileName.tar.gz

## Step 7: Go through the readme file

## Step 8: Edit the start file
Go in to your extracted Zcash file and find the 'start.sh' file. If it doesn't have one make one. Select it, right click on it and click 'Edit'. Once you are here you will need to delete the contents in it and paste this with your addresses and press save. 

sudo ./miner --server us1-zcash.flypool.org --user t1R4jPCmBof2tGBjPPEvG19Lsno5erhAkUw.rig01 --pass x --port 3333 --cuda_devices 0 1 2 3


## Step 8: Start your miner
To see all the directories in your current location type 'ls'. I personally like to change the name of my zcash directory in the home folder to 'zcash' just so it's shorter. You can do this by selecting the directory you want to rename and pressing 'F2'. Now we will need to change directories to the zcash directory. So type in the terminal

cd zcash

Now we need make the 'start.sh' file executable, to do this type:
chmod +x start.sh

Now me personally I am a little superstittious when it comes to running things and I for some reason like to run my mining programs a super user. This will be a little redundant, but this is just how I do it. 

su
Type in your password
sudo ./start.sh


# Congratulations!! You are now mining Zcash!

If you have any questions feel free to ask me. I'll help out as much as I can.
👍 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,