Friday, June 26, 2020

Start/Stop/Set On-Boot a service

For CentOS/RedHat:

sudo systemctl enable servicename
sudo systemctl start servicename


For Ubuntu
enable or disablesystemctl enable/disable apache2
sudo systemctl [action] [service name]
To start a service:
sudo systemctl stop ufw
To stop a service:
sudo systemctl start ufw
To restart a service:
sudo systemctl restart ufw

No comments:

Post a Comment