> For the complete documentation index, see [llms.txt](https://apool.gitbook.io/help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apool.gitbook.io/help/doge-pool-tutorial/aleo-linux-mining-tutorial.md).

# Aleo Linux Mining Tutorial

**1.  Acquire sub-account**

In order to earn aleo, one must mine to a sub-account. Head over to [https://www.apool.io ](https://www.apool.io/)to finish email registration.&#x20;

Apool will allocate a sub-account automatically under your name.  Check out your sub-account name in 'My miners' page.

<figure><img src="/files/LgV2GKoW0dJspA7zRioE" alt=""><figcaption></figcaption></figure>

&#x20;**2. Download the mining software**

* Download link：[https://github.com/apool-io/zkminer/releases](https://github.com/apool-io/zkminer/releases/tag/v0.0.1)

<figure><img src="/files/POvfYQVvuWG4lYiRy20n" alt=""><figcaption></figcaption></figure>

* Extract the file with the comand：

```
tar zxf zkminer_linux_v0.0.1.tar.gz
```

&#x20;**3. Modify the configuration file miner.conf and change the account to your own.**

<figure><img src="/files/gTVWZ2tiXgpPrRFxsubl" alt=""><figcaption></figcaption></figure>

If you need to adjust other parameters, remove the # comment and modify the corresponding values according to the parameter description.

```
account=my_sub_account
worker=my_worker

#gpu=0,1,2
```

* <mark style="color:red;">Configuration files for Qubic mining idle mode, switch to user-defined third-party mining</mark>

  1. <mark style="color:red;">You need to download zkminer and put it in the same directory as the configuration file.</mark>
  2. <mark style="color:red;">The third\_cmd parameter must be a mining startup command and cannot be written as a startup script</mark>

  <pre data-overflow="wrap"><code>algo=qubic
  account=my_sub_account
  pool=qubic1.hk.apool.io:3334
  third_miner = "zkminer"
  third_cmd = "./zkminer -a my_sub_account -w my_worker -s aleo1.hk.apool.io -p 9090"
  </code></pre>

**5.Run and shutdown**

* #### Select the execution script according to your needs

  * [ ] &#x20;<mark style="color:red;">Autoupgrade Start command</mark>

  <figure><img src="/files/Azrvmwg8O2SpNOKuzpVA" alt=""><figcaption></figcaption></figure>
* If you wt to run an automatic upgrade of ZKminer, you can execute the upgrade\_and\_run.sh script

```
sudo nohup bash upgrade_and_run.sh > run.log 2>&1 &
```

&#x20;

* [ ] &#x20;<mark style="color:red;">Manually operated Start command</mark>

<figure><img src="/files/5rHsWDnRMYmpuRUyMGFj" alt=""><figcaption></figcaption></figure>

* If you do not need to automatically upgrade ZKminer, you can execute the run.sh script

```
sudo bash run.sh
```

**6.** View ZKminer log

```
tail -f aleo.log
```

**7.**&#x73;hutdown ZKminer command

```
sudo killall -9 zkminer
```

&#x20;

**8.**&#x73;hutdown autoupgrade script

If you are running an automatic upgrade script, use the following command to shutdown and it will no longer be upgraded.

{% code overflow="wrap" %}

```
for i in $(ps aux|grep "upgrade_and_run"|grep -v grep |awk '{print $2}'); do sudo kill -9 $i; done
```

{% endcode %}

**9. Watch the Statistics and earn Aleo on Apool**

<https://www.apool.io/myMiner>
