Skip to main content

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

  1. To display a list of services available use the command the below
systemctl -t service

This will display something similar to

04.PNG

Disable unnecessary services

  1. 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