If you don’t have a spare Mac or your Mac is too old to download macOS from the Apple App Store then use the method below.
Create account on hackintosh.download
The download required macOS from https://www.hackintosh.download/category/3-macos/
Insert a usb (16GB+ recommended) into Linux PC usb port and run Terminal
Use fdisk to determine your usb dev name letter, e.g. /dev/sdc. It is very important to note the correct device letter or you may overwrite your own system or data drive!
sudo fdisk -l
Use dm2img to copy macOS (OS X El Capitan in this example) to your usb device (sdc in this example). This completely overwrites whatever is on the usb drive already!
sudo apt install dmg2img # install dmg2img if not installed sudo dmg2img -v -i ./EL_Capitan.dmg -o /dev/sdc Output from dmg2img... dmg2img v1.6.7 (c) vu1tur (email@example.com) ./EL_Capitan.dmg --> /dev/sdc reading property list, 361779 bytes from address 6237611619 ... partition 0: begin=192, size=430, decoded=284 partition 1: begin=908, size=430, decoded=284 partition 2: begin=1611, size=356137, decoded=239844 decompressing: opening partition 0 ...  100.00% ok opening partition 1 ...  100.00% ok opening partition 2 ...  100.00% ok
When complete eject the usb to flush IO buffers (important!) by clicking on the usb icon on the desktop and click remove | eject.
Insert usb in your Mac and power-up holding down the Alt | Option key until the Install usb icon is displayed in the middle of the screen.
Select the install usb to install macOS
Once in Recovery mode select Disk Utility to erase disk (if new drive or clean install)
Exit Disk Utility
Select mac OS to install from main menu and install to your main HDD or SSD
Note: the download source above is not Apple approved. To be safe, once your Mac is up and running, download the mac OS again from the Apple Store and re-create the install usb and carry out a clean install.