Mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied

Including all of the necessary prerequisites and fundamental administration knowledge is difficult for any tutorial. I see that you have opened an issue with the tutorial author, so they may be able to provide further assistance.

As @yosiasz and @cretin have described, this is a permissions issue. I recommend reviewing their suggestions, as well as the solution Usman linked in the Grafana issue you opened.

I’m not sure what distribution you’re running so please refer to more specific documentation as needed, but beginning with reviewing Linux file permissions and file structure should be helpful for this and future projects: