Inhaltsverzeichnis

Rosetta Stone Linux (or Inter-Linux)

The following scheme compares some commands and tasks by some distributions, to face differences and similarities. Maybe it's usefull when switching to an other Linux-Distributon.

package management

Action Debian1) Red Hat/CentOS/Fedora2) openSUSE3) Gentoo4)
update repositories aptitude update zypper refresh emerge –sync
install upgrades aptitude safe-upgrade yum update zypper update emerge -u[p]D world
search package by name aptitude search [package] yum list [package] zypper search [package] emerge -s [package]
show package description aptitude show [package] yum info [package] zypper info [package] emerge -s [package]
install package aptitude install [package] yum install [package] yast2 install / -i [package]
zypper install
emerge [package]
show the package to wehre
a specified file belongs
dpkg -S [filename] rpm -qf [filename] equery5) belongs [filename]
which of the not installed
packages ships a specified file
apt-file find [filename] 6) yum whatprovides [filename] -7)
show content of a non-installed package
available in the repositories
apt-file -F list [package] 8)
show content of a local available
package file
dpkg -c [package.deb]9) rpm -qpl [package.rpm]
show information of a local available
package file
dpkg -I [package.deb]10) rpm -qpi [package.rpm]
verify installed packages debsums [package]11)
debsums -as
rpm -V [package]
rpm -Va
-
extract package
without installation
1. ar xv [package].deb
2. tar -xzvf data.tar.gz
rpm2cpio [package].rpm | cpio -idmv -12)
build package from source apt-build install –rebuild [package]13) rpm -i [package].src.rpm
cd /usr/src/packages/SPEC
rpmbuild -ba [package].spec
this is done by default in gentoo
compile kernel
install required tools aptitude install build-essential zypper install -t pattern devel_kernel
compile kernel an build package sudo fakeroot make-kpkg \
–revision $REVISION –initrd \
kernel_image modules_image
make oldconfig
maybe rm *.spec14)
make binrpm-pkg
rpm -i /usr/src/packages/RPMS/i386 ..
mkinitrd -k /boot/Kernel-file -i /boot/initrdfile

management of users and groups

Action Debian15) Red Hat/CentOS/Fedora16) openSUSE Gentoo
add user useradd [-m][-g primary group17)] user
change users primary group18) usermod -g group user
delete user userdel [-r] user
add group groupadd group
add user user to a group adduser user group19)
gpasswd -a user group
usermod -aG group[,group] user
gpasswd -a user group
groupmod -A user group usermod -aG group[,group] user
gpasswd -a user group
remove a user from a specified group deluser user group20)
gpasswd -d user group
gpasswd -d user group groupmod -R user group gpasswd -d user group
declare a user to a groups administrator gpasswd -A user,… group no more impelemted (since 10.x?) 21) gpasswd -A user,… group
add a list of users
to a specified group 22)
gpasswd -M user,… group

system settings

action Debian Red Hat/CentOS/Fedora openSUSE Gentoo
change umask system-wide /etc/profile /etc/login.defs
activate services for (Default-) Runlevel update-rc.d [name] defaults insserv [name] | chkconfig -a name23)

{{vcard>[polyformal] Stefan Pampel <stefan-dot-pampel@polyformal.de-removeme> http://www.polyformal.de/ # +49 221 3103 122 & & & +49 221 9311 9223 | Kaesenstraße 8, D-50677 Köln, Germany }}{{vcards:stefan_pampel_small.jpg?80|}}

3)
Zypper since 10.2 since Beta1. It uses libzypp.
5)
The command equery shipped by the package app-portage/gentoolkit
6) , 8)
you have to run apt-file update the first time to build the cache
7)
Gentoo compiles packages/software from source. So usualy it's not possible to query files against non-installed packages.
9)
-c or –contents
10)
-I or –info
11)
The MD5-databes must be initialized before with debsums_init.
12)
Because of Gentoo will be compiled from the source code of packages, it is possible to do a emerge -f [package], then copy the package from ${DISTDIR} (e.g. /usr/portage/distfiles) and extract with tar
13)
maybe you have to run apt-get build-dep [package] before to install required libraries.
14)
when doing a new revision
17) , 18)
The primary group also calledinitial group or login group
19) , 20)
Debian-specific
21)
over LDAP
22)
replace all existing memberships