Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 6908  / 3 Years ago, thu, november 11, 2021, 3:29:03

Possible Duplicate:

Chkconfig alternative for Ubuntu Server?






In Fedora I can do



$ chkconfig --list | grep ssh

Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.

sshd 0:off 1:off 2:off 3:off 4:off 5:off 6:off


and it shows all run levels. Then I can use



chkconfig sshd on


or



chkconfig sshd off


How can I do the same in my Ubuntu 11.04? + How do i mention in which runlevel it should start?


More From » 11.04

 Answers
5

Even if Ubuntu uses Upstart, not all services have been migrated to it yet and hence the old System-V style init scripts (files in /etc/init.d/.)



According to the manual page of chkconfig, off and on are used for stopping or starting services, not disabling them.




  • To start the SSH daemon (which is named ssh), run: sudo start ssh

  • Similarly, to stop it: sudo stop ssh



To list the status of all services, use:
(N.B. output is lengthy and goes to stderr)



sudo service --status-all 2>&1 | more


These commands work for both the Upstart scripts as well as for the services in /etc/init.d/.


[#43574] Friday, November 12, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
thellfi

Total Points: 222
Total Questions: 103
Total Answers: 123

Location: Palau
Member since Mon, Aug 16, 2021
3 Years ago
thellfi questions
;