TransWikia.com

What is the difference between systemctl start [service] and systemctl start [service].service?

Ask Ubuntu Asked by user1046658 on December 8, 2021

With the commands systemctl start apache2 and systemctl start apache2.service, is there any difference between them?

What does the .service mean? Does it do anything that systemctl start apache2 does not?

Or is apache2 just the shortened version of apache2.service?

2 Answers

No difference between them.

.service is the unit file containing all information necessary to control the service (start, restart, stop, logging etc.)

Yes, apache2 is the shorter version of apache2.service for the question's context.

Answered by Gabb3 on December 8, 2021

First link with Google systemctl start why .service has the answer. Here the copypasta :)


In systemd, the target of most actions are “units”, which are resources that systemd knows how to manage. Units are categorized by the type of resource they represent and they are defined with files known as unit files. The type of each unit can be inferred from the suffix on the end of the file.

For service management tasks, the target unit will be service units, which have unit files with a suffix of .service. However, for most service management commands, you can actually leave off the .service suffix, as systemd is smart enough to know that you probably want to operate on a service when using service management commands.

Answered by B. du Garay on December 8, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP