To start a service

# Syntax
sudo service [service name] start

# To start the Apache web server service
sudo service apache2 start

<aside> 💡 We can run Apache web server and then if we open our host IP address in a browser, we will see a default Apache web page. Now to upload/host a malware we can go to the directory /var/www/html/

</aside>

To stop a service

# Syntax
sudo service [service name] stop

# To stop the Apache web server service.
sudo service apache2 stop

To starts a simple HTTP server using Python on port 80

python3 -m http.server 80

Enabling/Disabling services to run automatically on system boot

To start the service automatically on system boot

sudo systemctl enable postgresql

To disable the service from starting automatically on system boot

sudo systemctl disable ssh