![]() ![]() In order to improve your Linux system's boot time, you need to find the unnecessary services and disable them. The more applications you install on your computer, the longer it takes for your system to boot. To show the state of a specific service, run this command: $ initctl show-config Disable Startup Services In Linux To list all services and show their statuses at each run level, run: $ sudo initctl list | awk '' | xargs -n1 initctl show-config If you want to show all System jobs, run: $ sudo initctl -system list The above command will show all Session jobs. If you Linux system uses upstart, run this command to list all startup services: $ sudo initctl list You can also view the status of a specific service at different run level like below: $ sudo chkconfig -list httpd In the above command, "on" means the service is started at boot. A sample output of the above command will be: acpid 0:off 1:off 2:on 3:on 4:on 5:on 6:offĪnamon 0:off 1:off 2:off 3:off 4:off 5:off 6:offĪtd 0:off 1:off 2:off 3:on 4:on 5:on 6:off This command will list status of each service on each run level. To list all services which are enabled at boot, run: $ sudo chkconfig -list Here, the + indicates the service is running, and - indicates a stopped service. If you see ? in the output, the service state cannot be determined (for some reason). If your system uses sysv, run the following command to list all services: $ sudo service -status-all Like I already said, some older Linux distributions may use either SysV or Upstart as their default init system. To list all disabled services at system boot, run: $ sudo systemctl list-unit-files -type=service -state=disabled -all rvice enabled enabledħ4 unit files listed. ![]() To list only the enabled services at system boot, run: $ sudo systemctl list-unit-files -type=service -state=enabled -allĪrvice enabled enabled enabled The services that are started at boot are marked as enabled, and the services that are not started are marked as disabled. You can verify it by looking under the STATE section in the above output. List all services in Linux with systemdĪs stated above, this command shows the list of all services (both enabled and disabled at system boot) in your Linux system. Xfs_scrub_all.service static static enabledĢ65 unit files listed. Sample output: UNIT FILE STATE VENDOR PRESETĪrvice static static enabled If your systems runs with systemd system manager, you can list all services with the following command: $ sudo systemctl list-unit-files -type=service
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |