3

I'm a new Linux user, I'm using LAMP in Ubuntu 18.04, both orders run equals in appearance.

What is the difference between the next two commands:

sudo service apache2 restart 

sudo systemctl restart apache2
Orici
  • 131
  • 1
  • 3
  • 5
    Does this answer your question? [Difference between systemctl and service commands](https://askubuntu.com/questions/903354/difference-between-systemctl-and-service-commands) – Gryu Mar 09 '20 at 12:15

1 Answers1

2

service is used when dealing with old system V init scripts and systemctl for systemd services, etc. I would suggest not dealing with service or system V init scripts anymore, unless it's some legacy application.

BulletBob
  • 1,750
  • 2
  • 7
  • 12