Installing robot hat

I have tried installing robot hat with your code:

cd ~/
git clone -b 2.5.x GitHub - sunfounder/robot-hat: Robot Hat python library --depth 1
cd robot-hat
sudo python3 install.py

but it keeps coming up with a syntax error on the ~ character

Strange thats standard linux, however,

cd ~/

Just takes you to your home directory so you can simply use cd on its own I.e

cd

Which does the same

If that doesn’t work, copy, paste then post the actual full error message and your command lines on this forum