The Best and the more stable version of linux to run a masternode is UBUNTU version 16.04.
OP didn't talk about masternode, but
bitcoin full nodeto install linux dependencies run this commands one by one:
Just use
&& so you only need to run the commend once, example :
sudo apt-get update && sudo apt-get upgrade
You also can make simple run bash script to automate it rather than run the command one by one