Elasticsearch snapshot for starting Kibana as a developer

To create a custom plugin, I
1. I cloned the kibana git hub repo
2. yarn kbn bootstrap ----> was succesfull

The next step as per the documentation, (Getting started | Kibana Guide [master] | Elastic)

  1. yarn es snapshot ---- > error
[2022-08-15T09:42:45,344][ERROR][o.e.b.Elasticsearch      ] [localhost.localdomain] fatal exception while booting Elasticsearch
java.lang.RuntimeException: can not run elasticsearch as root
	at org.elasticsearch.bootstrap.Elasticsearch.initializeNatives(Elasticsearch.java:260) ~[elasticsearch-8.5.0-SNAPSHOT.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch.initPhase2(Elasticsearch.java:166) ~[elasticsearch-8.5.0-SNAPSHOT.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:66) ~[elasticsearch-8.5.0-SNAPSHOT.jar:?]

You will need to make sure you are not root.

I had downloaded the source code and done yarn kbn bootstrap as a root user.

So should I create another user for the machine and then start afresh from downloading the source code? If yes, is it good to do the same in /home/user-name directory ... or create another directory in /.

I created a different user for my linux machine and in ./created a folder and git cloned the Kibana repo into it... and then did all the steps afresh from there.