On a FreeBSD system, the /etc/rc.d
directory contains scripts that are used to start, stop, and manage system services during the boot process. If you want to disable a service that is started up at initial boot time, you can use the following steps:
Find the script for the service: In the /etc/rc.d
directory, look for the script that corresponds to the service you want to disable. The script should be named after the service, with the .sh
extension. For example, if you want to disable the sshd
service, you will find the script at /etc/rc.d/sshd.sh
.
Make the script non-executable: To disable the service, you can make the script non-executable by running the following command:
chmod -x /etc/rc.d/service.sh
Replace service.sh
with the name of the script for the service you want to disable.
You can also use this same method to enable a service that has been disabled by making the script executable again using the chmod +x
command.