Friday, 3 June 2011

Start, stop and check the status of network services

Another relatively simple objective.

Start:

service servicename start

/etc/init.d/servicename start

Stop:

service servicename stop

/etc/init.d/servicename stop

Check Status


service servicename status

/etc/init.d/servicename status

Some services will have different commands available, just type service servicename to see them, e.g.
service sshd
Usage: /etc/init.d/sshd {start|stop|restart|reload|force-reload|condrestart|try-restart|status}
service httpd
Usage: httpd {start|stop|restart|condrestart|try-restart|force-reload|reload|status|fullstatus|graceful|help|configtest}

2 comments:

  1. FYI, in the Jang book, he points to the "Networking Primer" when he mentions this objective. Seems like your post makes more sense, though.

    ReplyDelete