Drupal 8: file setup for multisites, single codebase

I was unable to find a coherent explanation for running multiple Drupal 8 websites from a single codebase in a UNIX environment. Here are some notes I hope will be helpful.

1. Navigate to the “sites” folder in your root directory. Change the name of the file "examples.sites.php" to "sites.php". Edit sites.php to list your individual domain names as shown in the example below. You can have an unlimited number of domains drawing on the resources of a single codebase. Make sure to remove the * before each line.

* The following examples look for a site configuration in sites/example.com:
* URL: http://localhost:8080/example
* $sites['8080.localhost.example'] = 'example.com';
URL: http://domainname1.com
$sites['domainname1.com'] = 'domainname1.com';
URL: http://domainname2.com
$sites['domainname2.com'] = 'domainname2.com';
URL: http://domainname3.com
$sites['domainname3.com'] = 'domainname3.com';
URL: http://domainname4.com
$sites['domainname4.com'] = 'domainname4.com';
* URL: https://www.drupal.org:8080/mysite/test/
* $sites['8080.www.drupal.org.mysite.test'] = 'example.com';
* @see default.settings.php
* @see \Drupal\Core\DrupalKernel::getSitePath()
* @see https://www.drupal.org/documentation/install/multi-site

2. Go to root, and in your "sites" folder you will need to create individual folders that correspond to each of the domain names you enumerated in sites.php. Each of these folders will contain an unedited settings.php file to which your server must be able to write in order to create your site. In DNS settings make sure that you point your various sites folders to the root directory where the entire drupal package is stored, not / not to the individual directories in sites that correspond to your domain names.