Disable Or Remove Server Services
Disable or remove server services that are not going to be utilized (e.g. FTP, DNS, LDAP, SMB, DHCP, NFS, SNMP, etc.)
Display a list of services available
- To display a list of services available use the command the below
systemctl -t service
This will display something similar to
Disable unnecessary services
- Stop and turn OFF auto-start services not needed
systemctl stop "service name"
systemctl disable "service name"
I.e. to stop and disable the Postfix service
============================================
systemctl stop postfix
systemctl disable postfix