Step 1 Preparation
If you have not already done so please download a Android image of your choosing. Please note that the images requiring the PhoenixCard utility only work under Windows for all other images (Raw Disk) you can use your operating system of choice.
If you wish to do things via a GUI utility and not via Terminal command line install the following (Debian/Ubuntu example).
apt-get install gnome-disk-utility
Finally right click on the Android image you just downloaded and select "Extract Here" if you are using GUI (Mate/Unity/Gnome etc). If you are using Terminal do the following (Debian/Ubuntu example).
unzip pine64-image-name.zip -d ./
Step 2a SD Card Imaging Via GUI
Let's insert your MicroSD card into your pc/laptop card reader (may require micro to sd converter card) then proceed to use "Disks" which can be found under "Accessories" section of your applications menu.
You should see the following.
Now select the disk you wish to write to and then click on the "Gear" looking button at the top of the UI and select "Restore Disk Image...". Now click on the "File Folder Icon" then select the Android image file you decompressed (.img) and finally click "Start Restoring...".
Once the image has been written to your SD card be sure to close the application and to unmount your SD card safely from Linux.
Step 2b SD Card Imaging Via Command Line
Open up Terminal and cd into the directory where you decompressed the Android image you downloaded.
We will have to figure out which of your disks is the SD card on your machine before we can write the image to disk so execute.
Pay attention to the disks listed (they will appear as /dev/sda /dev/sdb etc). Look for the /dev/sdX option that matches your SD card's details (size attribute). If you are in doubt eject your disk and re-run the command and if you noticed the output is missing a disk then chances are that is the disk you want to use. Now proceed with the following command (/dev/sdb will be used as an example):
sudo umount /dev/sdb1
sudo dd if=pine64-image-name.img of=/dev/sdb bs=1M
Now patiently wait until the command completes writing the image to the SD card.
Once the image has been written to your SD card be sure to unmount your SD card safely from Linux.