I know this post is a little older but the answers on here still require you to remember to pass your generation command with the specific path. However, it appears the actual request was to set some sort of pre-set or pre-defined path so that all services are generated in the desired path by default.
This is possible by modifying the desired @schematics object within the angular.json file located in the root of your application. Specifically, regarding this request you would make the following modification:
"@schematics/angular:service": {
"path": "src/services"
}
This is located under "projects" > [app name] > "schematics". Once you make this change, you simply need to run:
ng g s service-name
and it will create your service in the desired folder.
Note:
I'm currently running Angular/Angular CLI version 10.2.0. Though I've used this method in previous versions of Angular as well, but if you're running a much older version this feature may/may not exist.