On a legacy SysV-init system, remove legacy.service from runlevel startup.
Do not stop its currently running process.
Which command is appropriate?
In legacy environments, chkconfig SERVICE off changes runlevel startup settings. service stop only affects the current process.
Detailed explanation
service legacy.service stopIncorrect. service stop stops the current service but does not necessarily change boot settings.
chkconfig legacy.service offCorrect. It disables startup in the legacy configuration.
chkconfig legacy.service onIncorrect. on enables startup.
service legacy.service statusIncorrect. status only displays current state.
Try it yourself
An example you can run in a temporary verification environment.
chkconfig --help 2>&1 | grep -E -- 'on|off' | head -n 2Expected result
on/offに関するhelp行Key points
- chkconfig off
- Separate from service stop
- SysV management
Notes
- Environment: chkconfig help / service変更なし
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Protected account data
Sensitive authentication data stored separately from ordinary account records.
Service availability
Whether a service can start automatically or be activated on demand.
Packet filter
A host firewall rule set that permits or rejects network packets.