2

I installed some services such as ntpdate and reportbug. How I can check their status and start/stop them? These don't work with service commands.

2 Answers 2

5

I think you should check this link..

Check The Link

And for stopping and Starting we use service command--

service SCRIPT COMMAND [OPTIONS]
service --status-all

service --help | -h | --version

service runs a System V init script in as predictable environment as possible, removing most environment variables and with current working directory set to /. The SCRIPT parameter specifies a System V init script, located in /etc/init.d/SCRIPT. The supported values of COMMAND depend on the invoked script, service passes COMMAND and OPTIONS it to the init script unmodified. All scripts should support at least the start and stop commands. As a special case, if COMMAND is --full-restart, the script is run twice, first with the stop command, then with the start command.

service --status-all runs all init scripts, in alphabetical order, with the status command.

like in Case of ntp--

sudo service ntp stop
sudo service ntp start
sudo service ntp restart
sudo service ntp status
0

ntpdate is not a service, it is a command line utility, so it naturally does not work with the service command. I have not used reportbug, but I think it is also just a command line utility, not a service.

EDIT: BTW, if you want a service that synchronizes time, then you are looking for ntp, not ntpdate. ntpd is a real service and it can be controlled using the standard service xyz start/stop/status commands.

2
  • Is there any way to check their status? if I want to disable them, I must be uninstall them?
    – Gohar
    Nov 19, 2014 at 5:43
  • since they are not services/daemons, they don't have a status, they are just installed and sit on your hard drive until you actually execute them. Hope this makes sense. And if you do not want them, then you can uninstall them, but again - there is no way to disable them, because they do nothing until you execute them and they would exit once they finish their task. Nov 19, 2014 at 5:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .