systemctl restart xxx versus systemctl restart xxx.service

0

No CentOS, posso usar:

systemctl restart xxx

para reiniciar um serviço e usar:

systemctl restart xxx.service 

para iniciar um serviço também.

Mas se houver alguma diferença aqui?

    
por lustre 06.07.2017 / 03:39

1 resposta

2

man systemctl :

Parameter Syntax Unit commands listed above take either a single unit name (designated as NAME), or multiple unit specifications (designated as PATTERN...). In the first case, the unit name with or without a suffix must be given. If the suffix is not specified (unit name is "abbreviated"), systemctl will append a suitable suffix, ".service" by default, and a type-specific suffix in case of commands which operate only on specific unit types. For example,

       # systemctl start sshd

and

       # systemctl start sshd.service

are equivalent, as are

       # systemctl isolate default

and

       # systemctl isolate default.target
    
por 06.07.2017 / 03:45