特殊:Badtitle/NS100:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
(未显示同一用户的4个中间版本) | |||
第1行: | 第1行: | ||
{{From|https://help.ubuntu.com/community/SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}} | {{From|https://help.ubuntu.com/community/SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}} | ||
{{Languages|UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}} | {{Languages|UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}} | ||
#title Switching to Ubuntu from Red Hat Enterprise Linux or Fedora | |||
It | It is easy to apply your existing knowledge of ''Red Hat Enterprise Linux'' or ''Fedora'' to Ubuntu. The key differences between them are covered in this article. | ||
=== Administrative Tasks === | === 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 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]. | 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 [[UbuntuHelp:RootSudo|sudo]]. | ||
=== | === Package Management === | ||
Ubuntu has more | Ubuntu has more packages available than Fedora, so you'll have a better chance of finding what you want in the repositories. As with Fedora, graphical applications will put a link into the '''Applications''' menu. | ||
==== Graphical Tools ==== | ==== Graphical Tools ==== | ||
The '''Synaptic package Manager''' is an excellent tool for finding, fetching and installing packages. Press '''System -> Administration -> Synaptic Package Manager''' to start Synaptic. | |||
==== Command Line Tools ==== | ==== Command Line Tools ==== | ||
Ubuntu uses apt-get instead of yum | Ubuntu uses ''apt-get'' instead of ''yum'', ''up2date'' and so on 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 | Note that, unlike yum, apt-get is only for packages available in repositories - it cannot handle packages you have already downloaded. The dpkg command is used instead. | ||
==== Table of Equivalent Commands ==== | |||
Below is a table of equivalent commands for package management on both Ubuntu/Debian and Red Hat/Fedora systems. | |||
{|border="1" cellspacing="0" | {|border="1" cellspacing="0" | ||
|Task|| | | '''Task''' || '''Red Hat/Fedora''' || '''Ubuntu''' | ||
|- | |- | ||
| | |||||'''Adding, Removing and Upgrading Packages''' | ||
|- | |- | ||
| | | Refresh list of available packages || Yum refreshes each time it's used || apt-get update | ||
|- | |- | ||
| | | Install a package from a repository || yum install ''package_name'' || apt-get install ''package_name'' | ||
|- | |- | ||
| | | Install a package file || yum install ''package.rpm'' > rpm -i ''package.rpm'' || dpkg --install ''package.deb'' | ||
|- | |- | ||
| | | Remove a package || rpm -e ''package_name'' || apt-get remove ''package_name'' | ||
|- | |- | ||
| | | Check for package upgrades || yum check-update || apt-get -s upgrade > apt-get -s dist-upgrade | ||
|- | |- | ||
| | | Upgrade packages || yum update > rpm -Uvh [args] || apt-get dist-upgrade | ||
|- | |- | ||
| | | Upgrade the entire system || yum upgrade || apt-get dist-upgrade | ||
|- | |- | ||
| | |||||'''Package Information''' | ||
|- | |- | ||
|Get information about | | Get information about an available package || yum search ''package_name'' || apt-cache search ''package_name'' | ||
|- | |- | ||
| | | Show available packages || yum list available || apt-cache dumpavail | ||
|- | |- | ||
|List | | List all installed packages || yum list installed > rpm -qa || dpkg --list | ||
|- | |- | ||
| | | Get information about a package || yum info ''package_name'' || apt-cache show ''package_name'' | ||
|- | |- | ||
| | | Get information about an installed package || rpm -qi ''package_name'' || dpkg --status ''package_name'' | ||
|- | |- | ||
| | | List files in an installed package || rpm -ql ''package_name'' || dpkg --listfiles ''package_name'' | ||
|- | |- | ||
| | | List documentation files in an installed package || rpm -qd ''package_name'' || - | ||
|- | |- | ||
| | | List configuration files in an installed package || rpm -qc ''package_name'' || - | ||
|- | |- | ||
|Find package that provides a particular file||yum provides filename||apt-file search filename | | Show the packages a given package depends on || rpm -qR ''package_name'' || apt-cache depends | ||
|- | |||
| Show other packages that depend on a > given package (reverse dependency) || rpm -q -whatrequires [args] || apt-cache rdepends | |||
|- | |||
|||||'''Package File Information''' | |||
|- | |||
| 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 || rpm2cpio ''package.rpm'' | cpio -vid || dpkg-deb --extract ''package.deb'' dir-to-extract-to | |||
|- | |||
| 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'' | |||
|- | |||
|||||'''Misc. Packaging System Tools''' | |||
|- | |||
| Show stats about the package cache || - || apt-cache stats | |||
|- | |||
| Verify all installed packages || rpm -Va || debsums | |||
|- | |||
| Remove packages from the local cache directory || yum clean packages || apt-get clean | |||
|- | |||
| Remove only obsolete packages from the local cache directory || - || apt-get autoclean | |||
|- | |||
| Remove header files from the local cache directory > (forcing a new download of same on next use) || yum clean headers || apt-file purge | |||
|- | |||
|||||'''General Packaging System Information''' | |||
|- | |||
| Package file extension || *.rpm || *.deb | |||
|- | |||
| Repository location configuration || /etc/yum.conf || /etc/apt/sources.list | |||
|} | |} | ||
More technical information about Debian style packaging can be found | Some of the information in this table was derived (with permission) from [http://www.jpsdomain.org/linux/apt.html APT and RPM Packager Lookup Tables]. | ||
More technical information about Debian-style packaging can be found in [http://www.debian.org/doc/FAQ/ch-pkg_basics.en.html Basics of the Debian package management system] and the [http://www.debian.org/doc/manuals/maint-guide/index.en.html Debian New Maintainers' Guide]. | |||
=== Services === | === Services === | ||
Services on Ubuntu are managed in a broadly similar way to those on Red Hat. | |||
==== Graphical Tools ==== | ==== Graphical Tools ==== | ||
Services can be configured by clicking '''System''' -> '''Administration''' -> '''Services''' | Services can be configured by clicking '''System''' -> '''Administration''' -> '''Services'''. A tool called [http://www.marzocca.net/linux/bum.html Boot-Up Manager] is also available. | ||
==== Command Line Tools ==== | ==== Command Line Tools ==== | ||
Below is a table of example commands for managing services. The ''apache''/''httpd'' service is used as an example. | |||
{|border="1" cellspacing="0" | {|border="1" cellspacing="0" | ||
|Task||Red Hat | | '''Task''' || '''Red Hat / Fedora''' || '''Ubuntu''' || '''Ubuntu''' > (with sysv-rc-conf or sysvconfig) | ||
|- | |- | ||
|Starting/stopping services immediately||service httpd start|| | | '''Starting/stopping services immediately''' || service httpd start || invoke-rc.d apache start || service apache start | ||
|- | |- | ||
|Enabling a service at boot||chkconfig httpd on||sysv-rc-conf apache on | | '''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||sysv-rc-conf apache off | | '''Disabling a service at boot''' || chkconfig httpd off || update-rc.d apache purge || sysv-rc-conf apache off | ||
|} | |} | ||
Note: | '''Note:''' Whereas Red Hat and Fedora servers boot into runlevel 3 by default, Ubuntu servers default to runlevel 2. | ||
'''Note:''' The `service` and `invoke-rc.d` commands call init scripts to do the actual work. You can also start and stop services by doing e.g. `/etc/init.d/apache start` on Ubuntu, or `/etc/init.d/httpd start` on Red Hat/Fedora. | |||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2010年5月20日 (四) 00:19的最新版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/af | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|Afrikaans| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/ar | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|العربية| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/az | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|azərbaycanca| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/bcc | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|جهلسری بلوچی| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/bg | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|български| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/br | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|brezhoneg| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/ca | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|català| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/cs | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|čeština| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/de | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|Deutsch| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/el | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|Ελληνικά| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/es | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|español| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/fa | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|فارسی| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/fi | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|suomi| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/fr | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|français| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/gu | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|ગુજરાતી| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/he | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|עברית| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/hu | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|magyar| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/id | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|Bahasa Indonesia| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/it | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|italiano| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/ja | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|日本語| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/ko | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|한국어| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/ksh | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|Ripoarisch| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/mr | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|मराठी| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/ms | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|Bahasa Melayu| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/nl | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|Nederlands| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/no | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|norsk| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/oc | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|occitan| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/pl | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|polski| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/pt | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|português| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/ro | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|română| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/ru | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|русский| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/si | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|සිංහල| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/sq | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|shqip| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/sr | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|српски / srpski| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/sv | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|svenska| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/th | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|ไทย| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/tr | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|Türkçe| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/vi | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|Tiếng Việt| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/yue | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|粵語| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/zh | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|中文| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/zh-hans | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|中文(简体)| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora | {{#if: | :}}SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora}}/zh-hant | • {{#if: UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|中文(繁體)| [[::SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|:SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#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 | | }}
- title Switching to Ubuntu from Red Hat Enterprise Linux or Fedora
It is easy to apply your existing knowledge of Red Hat Enterprise Linux or Fedora to Ubuntu. The key differences between them are covered in this article.
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 sudo.
Package Management
Ubuntu has more packages available than Fedora, so you'll have a better chance of finding what you want in the repositories. As with Fedora, graphical applications will put a link into the Applications menu.
Graphical Tools
The Synaptic package Manager is an excellent tool for finding, fetching and installing packages. Press System -> Administration -> Synaptic Package Manager to start Synaptic.
Command Line Tools
Ubuntu uses apt-get instead of yum, up2date and so on 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 have already downloaded. The dpkg command is used instead.
Table of Equivalent Commands
Below is a table of equivalent commands for package management on both Ubuntu/Debian and Red Hat/Fedora systems.
Task | Red Hat/Fedora | Ubuntu |
Adding, Removing and Upgrading Packages | ||
Refresh list of available packages | Yum refreshes each time it's used | apt-get update |
Install a package from a repository | yum install package_name | apt-get install package_name |
Install a package file | yum install package.rpm > rpm -i package.rpm | dpkg --install package.deb |
Remove a package | rpm -e package_name | apt-get remove package_name |
Check for package upgrades | yum check-update | apt-get -s upgrade > apt-get -s dist-upgrade |
Upgrade packages | yum update > rpm -Uvh [args] | apt-get dist-upgrade |
Upgrade the entire system | yum upgrade | apt-get dist-upgrade |
Package Information | ||
Get information about an available package | yum search package_name | apt-cache search package_name |
Show available packages | yum list available | apt-cache dumpavail |
List all installed packages | yum list installed > rpm -qa | dpkg --list |
Get information about a package | yum info package_name | apt-cache show package_name |
Get information about an installed package | rpm -qi package_name | dpkg --status package_name |
List files in an installed package | rpm -ql package_name | dpkg --listfiles package_name |
List documentation files in an installed package | rpm -qd package_name | - |
List configuration files in an installed package | rpm -qc package_name | - |
Show the packages a given package depends on | rpm -qR package_name | apt-cache depends |
Show other packages that depend on a > given package (reverse dependency) | rpm -q -whatrequires [args] | apt-cache rdepends |
Package File Information | ||
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 |
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 |
Misc. Packaging System Tools | ||
Show stats about the package cache | - | apt-cache stats |
Verify all installed packages | rpm -Va | debsums |
Remove packages from the local cache directory | yum clean packages | apt-get clean |
Remove only obsolete packages from the local cache directory | - | apt-get autoclean |
Remove header files from the local cache directory > (forcing a new download of same on next use) | yum clean headers | apt-file purge |
General Packaging System Information | ||
Package file extension | *.rpm | *.deb |
Repository location configuration | /etc/yum.conf | /etc/apt/sources.list |
Some of the information in this table was derived (with permission) from APT and RPM Packager Lookup Tables. More technical information about Debian-style packaging can be found in Basics of the Debian package management system and the Debian New Maintainers' Guide.
Services
Services on Ubuntu are managed in a broadly similar way to those on Red Hat.
Graphical Tools
Services can be configured by clicking System -> Administration -> Services. A tool called Boot-Up Manager is also available.
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 |
Note: Whereas Red Hat and Fedora servers boot into runlevel 3 by default, Ubuntu servers default to runlevel 2. Note: The `service` and `invoke-rc.d` commands call init scripts to do the actual work. You can also start and stop services by doing e.g. `/etc/init.d/apache start` on Ubuntu, or `/etc/init.d/httpd start` on Red Hat/Fedora.