I've recently been delving more deeply into Debian Lenny, and have had to learn all the package management and administration tricks all over again. I compiled a little table of command equivalents to help me remember how to do most of the things I need to do on a daily basis:

Package Management


Red-Hat based

Debian based

Install updates

yum update

apt-get update; apt-get upgrade

Find package

yum search packagename

apt-cache search packagename

Install package

yum install packagename

apt-get install packagename

Uninstall package

yum remove packagename

apt-get remove packagename

List installed packages

rpm -qa|grep keyword

dpkg --get-selections|grep keyword


Service Management


Red-Hat based

Debian based

List installed services

chkconfig --list

sysv-rc-conf --list

Enable service

chkconfig servicename on

sysv-rc-conf servicename on

Disable service

chkconfig servicename off

sysv-rc-conf servicename off

Start service

service servicename start

/etc/init.d/servicename start

Stop service

service servicename stop

/etc/init.d/servicename stop

Restart service

service servicename restart

/etc/init.d/servicename restart

Service status

service servicename status

/etc/init.d/servicename status


Configuration Files


Red-Hat based

Debian based

Network interfaces

/etc/sysconfig/network-scripts/ifcfg-* one file per interface

/etc/network/interfaces one file contains all interfaces