---
title: "[Linux]Ubuntun与redhatService管理对比"
author: "MyEyeOfJava"
date: "2013-11-14T10:56:47Z"
tags: []
categories: ["操作系统"]
slug: "linux-ubuntun-redhatservice"
draft: false
lastmod: "2013-11-14T10:56:47Z"
id: 1974600
url: "https://myeyeofjava.iteye.com/blog/1974600"
---

### Command Line Tools

Below is a table of example commands for managing services. The apache/httpd service is used as an example.

 

**Task**

**Red Hat / Fedora**

**Ubuntu**

**Ubuntu**   
(with sysv-rc-conf or sysvconfig)

**Starting/stopping services immediately**

service httpd start

invoke-rc.d apache start

service apache start

**Enabling a service at boot**

chkconfig httpd on

update-rc.d apache defaults

sysv-rc-conf apache on

**Disabling a service at boot**

chkconfig httpd off

update-rc.d apache purge

sysv-rc-conf apache off