Command search path is just a variable -
$PATH variable you will see a list of directories that should be searched anytime a user types a command.
$PATH variable is user specific.
root will have different value of the
$PATH than ordinary user for example.
So how to extend path with a directory ?
echo $PATH again, you will see that
somedir has been added to it.
If you want to persist this, put it in