Personally I really like Monero for the fact that it is completely anonymous and CPU mining is actually worth it. Currently on all of my CPUs I mine XMR. So here is a step by step guide to mining XMR with your CPU on Ubuntu.
Step 1: Get a Monero Wallet
MyMonero
Make sure you save the string of words it gives you because this is basically your password. Once you have this you'll need to copy your XMR address.
Step 2: Install dependencies
Now I will say I know how to use Ubuntu 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 these 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 apt-get install git
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 g++-5
sudo apt-get upgrade
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 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
sudo apt-get upgrade
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update
sudo apt-get install cmake
sudo apt-get upgrade
Once you have installed all of these we don't want to be super user any more so type:
exit
Step 3: Download and and install xmr-stak-cpu
We will need to clone the github repository.
git clone https://github.com/fireice-uk/xmr-stak-cpu.git
Once you have done this you will now have the option to edit the donation level. To do this edit the file called 'donate-level.h', the initial amount is set to 1.0 but you can change it to 0.0 if you do not want to donate to the developers.
Now to install:
cd xmr-stak-cpu
cmake -DCMAKE_CXX_COMPILER=/usr/bin/g++-5 -DCMAKE_CC_COMPILER=/usr/bin/gcc5
make install
cd bin
chmod +x xmr-stak-cpu
Step 4: Decide how many threads you should use
To do this find out how much cache your CPU has and how many cores it has. So I have a CPU that has 4mb cache and 4 cores. In order to figure out how many threads you want to use you want to divide your cache by 2mb. So this CPU should use only 2 threads because 4mb/2mb=2.
I also have an AMD FX-9590. This has 16mb of cache and 8 cores. You would think that I should be using 8 threads, but that isn't the case. If the amount of threads you should be using is equal to the number of cores you have subtract 1. We don't want to use every core. So I mine with 7 threads on this chip because 16mb/2mb=8 and we have 8 cores so we subtract 1 and are left with 7 threads.
Step 5: Edit the config file
Once you have installed the miner you should go into xmr-stak-cpu's /bin folder and edit this 'config.txt' file. Click here to look at my config file. You will notice the section under 'cpu_threads_conf' is where you will put how many threads to use. This file is set up for 7 threads so remove as you feel necessary. Also you will need to scroll down and change the wallet address to your wallets address.
Step 6: Load Huge Pages
If you open up the config file you will notice a section outlining how to enable huge pages on Linux. But if you are lazy here is a pastebin link to what to do. At the end it will ask you to reset your computer.
Step 7: Create a start.sh file
While in the ../xmr-stak-cpu/bin repository create a file called 'start.sh'. Inside the file put this:
sudo sysctl -w vm.nr_hugepages=128
sudo ./xmr-stak-cpu config.txt
Once you have created it, in the remaining in the bin repository in the terminal put:
chmod +x start.sh
Step 9: Start up XMR-STAK-CPU
Navigate into your xmr-stak-cpu/bin folder in your terminal and become a super user.
su
sudo ./start.sh
Congradulations!! You are now mining Monero on your CPU!
If you have any other questions feel free to ask me!