Change Kibana.yml settings from command line

Hi, I just started learning Elastic and I was wondering how I change a specific .yml setting for kibana in the terminal? For example, let's say I wanted to change the server.port so I tried the following command below.

sudo -u kibana /usr/share/kibana/bin/kibana --server.port=5602

This did not work. After doing some research, I believe I have to use the path where the kibana executable is? How do I find that path?