Video Tutorial at https://youtu.be/1FpJvUVPxL0
In home directory:
cd ~
sudo apt install git
git clone https://github.com/ArduPilot/ardupilot.git
cd ardupilot
cd ardupilot
Tools/environment_install/install-prereqs-ubuntu.sh -y
reload profile
. ~/.profile
git config --global url.https://.insteadOf git://
git checkout Copter-4.0.4
git submodule update --init --recursive
Run SITL (Software In The Loop) once to set params:
cd ~/ardupilot/ArduCopter
sim_vehicle.py -w