Slackware traditionally uses shell scripts in
/etc/rc.d/. In many cases a service is "enabled" simply by making the script executable.1. Basic concept
rc.*scripts start and stop services- "Enabled at boot" often depends on the executable bit (
chmod +x) - Boot runs main scripts like
rc.M, which call services
2. List available scripts
ls -l /etc/rc.d/rc.*
ls -l /etc/rc.d | less
Common examples: rc.sshd, rc.httpd, rc.crond, rc.ntpd, rc.networkmanager.
3. Start, stop, restart a service
/etc/rc.d/rc.sshd start
/etc/rc.d/rc.sshd stop
/etc/rc.d/rc.sshd restart
/etc/rc.d/rc.sshd status # if supported by the script
Not all rc scripts support the same arguments. If
status is missing, check processes/ports manually.4. Enable/disable at boot
Many services start only if the script is executable.
# Enable
chmod +x /etc/rc.d/rc.sshd
# Disable
chmod -x /etc/rc.d/rc.sshd
Check permissions:
ls -l /etc/rc.d/rc.sshd
5. Useful checks after changes
ps aux | grep sshd
ss -tulpen | grep ':22'
tail -n 50 /var/log/messages
6. Typical services to consider on a Slackware server
rc.sshd(remote access)rc.crond(scheduled jobs)rc.ntpd(time sync)rc.httpd(Apache, if web server)rc.mysqld/ DB (only if needed)
Fewer active services = lower resource usage and smaller attack surface.
7. Create a custom rc script (basic)
For custom software, create your own /etc/rc.d/rc.my-service with start/stop/restart.
#!/bin/sh
case "$1" in
start)
/usr/local/bin/my-service &
;;
stop)
pkill -f /usr/local/bin/my-service
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
Make the script executable:
chmod +x /etc/rc.d/rc.my-service
8. Common errors
- Script not executable (
chmod +xforgotten) - Wrong binary path in the script
- Wrong permissions/user for the service
- Port already in use by another process
Quick checklist
[ ] Required services identified
[ ] rc scripts tested with start/stop/restart
[ ] Boot enablement verified (chmod +x)
[ ] Listening ports checked
[ ] Logs checked after start