This kind of details depend on the Unix flavour or the Linux distribution https://docs.moodle.org/en/Category:Installation. Taking Ubuntu https://docs.moodle.org/en/Installation_on_Ubuntu_using_Git as an example, the path will be /var/www/moodle. You can achieve both http://example.com and http://example.com/moodle by pointing the web root to /var/www/moodle or just /var/www.
Installing and upgrading help
Moodle install
This discussion has been locked so you can no longer reply to it.