# XEN创始人新项目：Xenium头矿使用GPU挖矿教程

By [wubao](https://paragraph.com/@47967) · 2023-09-29

---

[#Xenium](https://twitter.com/hashtag/Xenium?src=hashtag_click) 中文首发Gpu挖矿教程，五十倍+你的Cpu算力！！！ 昨晚的时候中文区大佬编译出了Linux版的Xenium Gpu矿工，从算力上看目前已经不是cpu能卷得起来的了， 今天熬夜搞了一下， 发现目前用win的子系统是最快的办法，所以整理了下教程。

[https://github.com/shanhaicoder/XENGPUMiner](https://github.com/shanhaicoder/XENGPUMiner)

![](https://storage.googleapis.com/papyrus_images/d8dac995707e9515fc655db6dfe3f1040e978c0772ec4d70eead11a3ef5ed4ed.png)

1、首先我们打开控制面板-选择程序-然后点击启用或者关闭windows功能- 下来找到适用于Linux的windows子系统开启。 -系统存在差异性，不一定所有界面一样

![](https://storage.googleapis.com/papyrus_images/406deac9f9cd9d7c08b7a735da92214671132507fb31113ecfce274ea59afe04.png)

![](https://storage.googleapis.com/papyrus_images/86fb14b9d73197e4f1217dc3af889ba7a732afda415620c17b2e651a965ce8c7.png)

2、第二步点开系统自带的Microsoft Store商店 -注意：如果点开发现网络异常或者白板的，关闭梯子重新打开就可以。 然后在搜索栏查找Ubuntu选择对应版本。

[https://wslstorestorage.blob.core.windows.net/wslblob/wsl\_update\_x64.msi](https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi)

然后我们需要下载wsl对应版本， 等安装完之后在Cmd输入wsl或者在开机界面单击Ubuntu

![](https://storage.googleapis.com/papyrus_images/82526bdfbd922f22f49c1f5e445bce263789f4682739239519c0dfe726d2158d.png)

3、点开Ubuntu的cmd界面之后，开始我们需要设置用户和密码-注意账户只能小写，密码需要确认两次。 设置完成后，我们需要下载cuda工具包， 下载之前要更新一遍系统文件命令：sudo apt update 更新完之后， 按照Github文档第一个命令执行：sudo apt install ocl-icd-opencl-dev

![](https://storage.googleapis.com/papyrus_images/4101bfe9ddcb34db7c354ff3936c267b482ff942dee8e852f0ce728984ad3242.png)

![](https://storage.googleapis.com/papyrus_images/2a65e26a0f18bde52101e6bc5306bbbd1a2b8340749a849931fba59616a0f850.png)

![](https://storage.googleapis.com/papyrus_images/abcd97f6dc0fccb018b1661a21c0000767b65684dc923d68439f3cfb18f53a41.png)

4/需要下载wsl版本的cuda，如果不开启，GPU不支持。

[https://developer.nvidia.com/cuda-downloads?target\_os=Linux&target\_arch=x86\_64&Distribution=WSL-Ubuntu&target\_version=2.0&target\_type=deb\_network](https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=WSL-Ubuntu&target_version=2.0&target_type=deb_network)

![](https://storage.googleapis.com/papyrus_images/33088231497fd25529390dfd355f822000c9d7b34634477adae0001ea9f7e638.png)

5/按照Git教程开始下载源代码进行编译

git clone [https://gitclone.com/github.com/shanhaicoder/XENGPUMiner](https://gitclone.com/github.com/shanhaicoder/XENGPUMiner)

\---------------

cd XENGPUMiner

* * *

chmod +x [build.sh](https://t.co/R03tF1RGk7)

\---------------

我替换了第一行的镜像，国内无门槛下载。这几步没什么大问题。

![](https://storage.googleapis.com/papyrus_images/843b99edcfe604be0eecc36aa6af94608a74e6bdec8d032595fe429ca5428aa9.png)

6/前面几步拉文件和给权限这些没什么大问题，到构建的时候他有一些缺少的依赖。像图片上的我们先运行：sudo apt-get install build-essential 然后我们再运行： sudo apt install cmake

![](https://storage.googleapis.com/papyrus_images/349b05de8d04eda63daf5af58fb4f7b3a28154948157de7070d00dcf00b8c0f7.png)

7/再然后我们构建程序。程序构建完后，我们需要把python依赖安装一下，图二的缺少pip我们需要用命令下载：sudo apt install python3-pip 每个人版本不一致有些版本使用： sudo apt install python-pip 安装完pip就可以进行依赖安装了：pip install -U -r requirements.txt

![](https://storage.googleapis.com/papyrus_images/7218b843e1bbe89acfeb3d78765dc0c0d70391b47dd59d5eb63dcf9f8a06e476.png)

![](https://storage.googleapis.com/papyrus_images/9b1366e41b189b44897b4c31bd5719d04d42f972aadec1645e61d9ff6ef0985a.png)

![](https://storage.googleapis.com/papyrus_images/019dcbc5720bcb44918e8a563812d676e3a68351f3d711491d4b84531a92ba75.png)

8/下一步我们就得更改config.conf文件,把钱包改成自己的，我们使用vim config.conf命令来修改，按i进行编辑，account这一行，修改完按ESC键，保存并推出使用:wq即可。

![](https://storage.googleapis.com/papyrus_images/b6e7da81ba84c5c77c9ea8b15da1fdd73eb82fd863cf078310558193a055e8d3.png)

9/最后我们需要再开一个ubuntu窗口，一个我们用来运行命令：python3 [http://miner.py](https://t.co/mdiURzlAwY) --gpu=true 另一个我们用来运行命令：./xengpuminer -b 1024 整体一套就可以了，可以从图上看到我这垃圾Gpu的算力也是正常cpu的五十倍+

![](https://storage.googleapis.com/papyrus_images/b81482ace1c11ce246660ec5fcfd57f46591f9957f709d1e90f435dc618e5eff.png)

这是windows下的子系统ubuntu，这是我觉得除了原声linux系统最快的办法了。

结语：最后感谢这篇教程的作者@YiSuos

---

*Originally published on [wubao](https://paragraph.com/@47967/xen-xenium-gpu)*
