Easily Control Service Auto-start Using Chkconfig

A friend showed me this and I've used it a few times since. Here's the easiest way to make a service auto start or stop after reboot:

chkconfig servicename on to auto-start and chkconfig servicename off to stop auto-startup.

Thanks, Lenny! Also, can anyone remind me what command I use to add regular user bins to root's path? (ie. add /usr/bin)


Update 2025:

  • On most modern Linux distributions that use systemd, the chkconfig utility is no longer present or is deprecated. The closest equivalent commands are:
    • Enable service at boot: systemctl enable <servicename>
    • Disable service at boot: systemctl disable <servicename>
    • Check enablement state: systemctl is-enabled <servicename>
  • Regarding root's PATH: Typical defaults already include /usr/bin. If you need to adjust PATH, prefer setting it system-wide via /etc/environment or a dedicated file in /etc/profile.d/, rather than editing per-user shell startup files for root. For a temporary session-only change: export PATH="/usr/bin:$PATH".