Linux CUDA installation [sudo sh error]

When I tried to install CUDA in Ubuntu, running:
sudo sh

I kept getting " Syntax error: newline unexpected"

I don’t know why. Can anyone know the solution to this?

Alternatively, you can pick an instance with CUDA already installed to save these work.

Solved. Thank you so much!

Please look at the install walkthrough.