sudo apt update && sudo apt upgrade -y
sudo apt-get install git curl bash -y  
git clone --depth 1 https://github.com/pi-hole/pi-hole.git Pi-hole
cd Pi-hole/automated install/ bash basic-install.sh
Control X + Y to save and exit
sudo shutdown -r now

Firewall Configuration

sudo ufw allow http
sudo ufw allow 53
sudo ufw allow 22
sudo ufw allow 161
sudo apt-get install gufw
----
sudo ufw status verbose

Update Pi-Hole

sudo curl -sSL https://install.pi-hole.net | bash
sudo pihole -up

Other Commands

Reset admin Password pihole -a -p
Update Lists pihole -g
Status pihole -status
Chronometer pihole -c -e

pihole checkout core release/v5.0
pihole checkout web release/v5.0

Documentation

Pi-Hole Documentation
Pi-Hole 5.0
Block Lists