# Linux Qubic+Aleo Idle Mining Tutorial

**1.  Acquire sub-account**

In order to earn qus, 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="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2F6wlzyyOLADp1FfwOFP5n%2F%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20240410112842.png?alt=media&#x26;token=fac31930-c33c-4923-8d66-10bda5e427e6" alt=""><figcaption></figcaption></figure>

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

* Download link：<https://github.com/apool-io/ThirdMiner/releases>

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2FBIkhiOFrANDtXj7Zbc3q%2Fimage.png?alt=media&#x26;token=00624044-6b59-40d5-bd55-0a3eb42ec81f" alt=""><figcaption></figcaption></figure>

* Extract the file with the comand：

```
tar zxf apoolminer_linux_qubic_aleo_dile_mining_v2.8.6.tar
```

**4. Modify the configuration file miner.conf and change the account to your own.**

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2FYjenyUzQZUlh1eZjOjZn%2Fimage.png?alt=media&#x26;token=8a4bb57f-1227-4c37-9b4c-2241e51732cc" alt=""><figcaption></figcaption></figure>

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2F6ISIDf4hNM3k13WXUTxJ%2Fimage.png?alt=media&#x26;token=4de77eed-6265-4249-933c-2e9db90b7bf1" alt=""><figcaption></figcaption></figure>

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

<pre><code><strong>algo=qubic
</strong>account=my_sub_account
pool=qubic1.hk.apool.io:3334

#worker=my_worker
#cpu-off=false
#thread=4
#gpu-off=false
#gpu=0,1,2

third_miner = "zkminer"
third_cmd = "./zkminer -a CP_xxxx -w my_worker -s aleo1.hk.apool.io -p 9090"
</code></pre>

{% code overflow="wrap" %}

```
algo=qubic
account=my_sub_account
pool=qubic1.hk.apool.io:3334

#worker=my_worker
#cpu-off=false
#thread=4
#gpu-off=false
#gpu=0,1,2

third_miner = "./aleo_prover --pool aleo.asia1.zk.work:10003 --pool aleo.hk.zk.work:10003 --pool aleo.jp.zk.work:10003 --address aleo1XXXXXXXXXXXXXXXXXX --custom_name %WORKER_NAME%"
```

{% endcode %}

<pre data-overflow="wrap"><code><strong>algo=qubic
</strong>account=my_sub_account
pool=qubic1.hk.apool.io:3334

#worker=my_worker
#cpu-off=false
#thread=4
#gpu-off=false
#gpu=0,1,2

third_miner = ./aleominer -u stratum+ssl://aleo-asia.f2pool.com:4420 -w account.workname
</code></pre>

<pre data-overflow="wrap"><code><strong>algo=qubic
</strong>account=my_sub_account
pool=qubic1.hk.apool.io:3334

#worker=my_worker
#cpu-off=false
#thread=4
#gpu-off=false
#gpu=0,1,2

third_miner = "oula-pool-prover"
third_cmd = "./oula-pool-prover --pool wss://aleo.oula.network:6666 --account oula_account --worker-name my_worker"
</code></pre>

**6.Run and shutdown**

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

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

  <figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2FE3rU7Tb4OKQjHoinID7G%2Fimage.png?alt=media&#x26;token=8d404df7-f196-4e63-aa37-15e6f0ff6bc9" alt=""><figcaption></figcaption></figure>
* If you want to run an automatic upgrade of apoolminer, you can execute the upgrade\_and\_run.sh script

```
nohup bash upgrade_and_run.sh 2>&1 &
```

&#x20;

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

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2FoIbE8dslOGgRd1uC9WMV%2Fimage.png?alt=media&#x26;token=a3aa9a65-c8e3-4604-bd8f-73a4d8f945f7" alt=""><figcaption></figcaption></figure>

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

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

**7.** View miner log

```
tail -f zkminer.log
```

```
tail -f qubic.log
```

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2FwbSsaCdU0eAawGKL9KcH%2Fimage.png?alt=media&#x26;token=e32e8d1f-3ff5-4e5f-8da6-5328199a1e12" alt=""><figcaption></figcaption></figure>

**8.**&#x73;hutdown miner command

```
killall -9 zkminer
```

```
killall -9 apoolminer
```

&#x20;

**9.**&#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 kill -9 $i; done
```

{% endcode %}

**10.**&#x73;hutdown run script

```
ps aux|grep -w "run.sh"|grep -v grep|grep -v nohup|awk '{print $2}'|xargs kill -9
```

**11. Watch the Statistics and earn ORE on Apool**

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