特殊:Badtitle/NS100:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora

来自Ubuntu中文
Oneleaf留言 | 贡献2007年5月14日 (一) 10:50的版本
跳到导航跳到搜索

{{#ifexist: :SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/zh | | {{#ifexist: SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/zh | | {{#ifeq: {{#titleparts:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|1|-1|}} | zh | | }}

Switching to Ubuntu From Red Hat Enterprise Linux or Fedora

It's easy to apply your existing knowledge of Red Hat Enterprise Linux or Fedora to Ubuntu. The key differences between them are covered in this guide.

Administrative Tasks

In Red Hat Enterprise Linux and Fedora by default, each administrative user needs to know the root password, in addition to their own password.

In Ubuntu, each user only has one password. Users in the admin group can run command line and graphical applications with elevated privileges. Graphical admin tools prompt for this password when run, and command line tools can be run with root-privileges using [RootSudo sudo].

Packaging

Ubuntu has more than three times as many packages available as Fedora (reference), so you'll have more chance of finding what you want in the repositories. Graphical apps will put a link into Ubuntu's Applications menu.

Graphical Tools

You'll find Synaptic to be an excellent tool for finding, fetching and installing packages.

Command Line Tools

Ubuntu uses apt-get instead of yum / up2date / urpmi etc. to find, download, and install packages (and their dependencies).

Note that unlike yum, apt-get is only for packages available in repositories - it cannot handle packages you've already downloaded. dpkg is used instead.

Task Using RHEL or Fedora Using Ubuntu
Refresh list of available packages Yum refreshes each time it's used apt-get update
Fetch and install a package (and any dependencies) yum install package apt-get install package
Get information about an available package yum search package apt-cache show package
Show available packages yum list available apt-cache dumpavail
List all installed packages yum list installed
rpm -qa
dpkg --list
Get information about an installed package yum info packagename
rpm -qi packagename
dpkg --status packagename
List files in an installed package rpm -ql pkgname dpkg --listfiles pkgname
List documentation files in an installed package rpm -qd pkgname ?
List configuration files in an installed package rpm -qc pkgname ?
Get information about a package file rpm -qpi package.rpm dpkg --info package.deb
List files in a package file rpm -qpl package.rpm dpkg --contents package.deb
List documentation files in a package file rpm -qpd package.rpm ?
List configuration files in a package file rpm -qpc package.rpm ?
Extract files in a package cpio -vid dpkg-deb --extract package.deb dir-to-extract-to
Install a package file yum install package.rpm
rpm -i package.rpm
dpkg --install package.deb
Remove a package rpm -e pkgname apt-get remove pkgname
Find package that installed a file rpm -qf filename dpkg --search filename
Find package that provides a particular file yum provides filename apt-file search filename

More technical information about Debian style packaging can be found at http://www.debian.org/doc/FAQ/ch-pkg_basics.en.html and http://www.debian.org/doc/manuals/maint-guide/index.en.html

Services

Graphical Tools

Services can be configured by clicking System -> Administration -> Services

There's also Boot-Up Manager.

Command Line Tools

Task Red Hat Enterprise / Fedora example (with Apache HTTPd) Ubuntu example
Starting/stopping services immediately service httpd start /etc/init.d/apache start or service apache start (from sysvconfig package) or use sysv-rc-conf
Enabling a service at boot chkconfig httpd on sysv-rc-conf apache on or update-rc.d apache defaults
Disabling a service at boot chkconfig httpd off sysv-rc-conf apache off or update-rc.d apache purge

Note: whereas Red Hat and Fedora's servers boot into runlevel 3 by default, Ubuntu servers default to runlevel 2.