I have been following one specific tutorial all along. My computer is Windows. I already successfully set the pgdata environment variable.
$ sudo -u postgres