快速地从Redhat系转Ubuntu系

简介: ubuntu官网的,https://help.ubuntu.com/community/SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora省得自己去总结了,直接贴过来,备用。

ubuntu官网的,https://help.ubuntu.com/community/SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora

省得自己去总结了,直接贴过来,备用。

===
SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora

Administrative Tasks
Package Management
Graphical Tools
Command Line Tools
Table of Equivalent Commands
Services
Graphical Tools
Command Line Tools
Network
Graphical Tools
Command Line Tools
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

Remove a package with configuration files

yum remove package_name

apt-get purge 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 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

dpkg-query --show -f '${Conffiles}\n' 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

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

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.

Network
Graphical Tools

Fedora/RHEL have system-config-network, ubuntu pre 10.04 had gnome-nettool to edit static ip address, since 10.04 nm-connection-editor is the best choice. For Ubuntu 10.04 Studio there is only manual editing of files since NetworkMontor is not included

Command Line Tools

  • ubuntu networking for basic and advanced users
目录
相关文章
|
2月前
|
Ubuntu Linux 测试技术
下载ISO镜像的方法 Debian、Red Hat 、CentOS、Ubuntu、Kali Linux🌐
Debian、Red Hat、CentOS、Ubuntu与Kali Linux均为知名Linux发行版。下载Debian须访问官网并按计算机架构选ISO文件。Red Hat下载通常需订阅账户,可从官网登录后获取。CentOS可从官网或镜像站点下载,注意CentOS 8已停更。Ubuntu下载简便,官网直接选取版本及架构即可。Kali Linux专为安全测试设计,官网提供直接下载ISO镜像服务。
467 0
|
编解码 Java Linux
linux【redhat&ubuntu】下ffmpeg-3.1安装编译及视频转码
这篇是几年前整理的老文章了,当时在调研流视频推送及播放相关技术,并在项目中应用,使用到ffmpeg,所以整理了这篇文章,但并未发布。最近又有相关的技术需求,所以整理出来,作为一个新的开始。
280 0
|
Ubuntu Oracle 关系型数据库
在RedHat 和 Ubuntu 中配置 Delphi 的Linux开发环境(转)
原文地址:http://chapmanworld.com/2016/12/29/configure-delphi-and-redhat-or-ubuntu-for-linux-development/   方便大家使用,直接转过来。
2332 0
|
Ubuntu Linux
阿里云 Linux 系统挂载数据盘:适用系统:Linux(Redhat , CentOS,Debian,Ubuntu)
阿里云 Linux 系统挂载数据盘:   适用系统:Linux(Redhat , CentOS,Debian,Ubuntu)   Linux的云服务器数据盘未做分区和格式化,可以根据以下步骤进行分区 Linux 系统挂载数据盘:   适用系统:Linux(Redhat , CentOS,Debian,Ubuntu) *  Linux的云服务器数据盘未做分区和格式化,可以根据以下步骤进行分区以及格式化操作。
3802 0
|
Linux
2Ubuntu/RedHat下nfs服务器搭建,Linux多台电脑共享目录
 1安装nfs(网络文件系统)服务器 共享的原理: 安装命令: sudo apt-get install nfs-kernel-server 2设置/etc/exports配置文件 添加以下这行配置 其中: *表示所有ip,如果想指定ip,可以把*换成你自己的ip地址。 rw:表示只读权限,如果想变成只读的,修改配置为ro sync:表示同步的方式。任何人对这个目录的修改,其它人都可以
1964 0
|
Ubuntu Linux 开发工具
Linux技巧--Redhat 5系统中的vim编辑器无法正常显示中文解决方案(中文显示为乱码)/Ubuntu 12.04系统gedit中文乱码
<h1><span style="font-family:宋体,Arial; line-height:26px; font-weight:normal"><span style="color:#cc0000">Redhat5 vim编辑器 中文乱码:</span></span></h1> <h1><span style="color:rgb(102,102,102); font-fami
2104 0
Redhat和ubuntu的区别
  风大神给了我一个完全基于 Linux 的操作系统ubuntu(乌班图)(是一个以桌面应用为主的Linux操作系统),当然作为linux,服务器应用都不会弱。,说是这个好用,可飞凌上资料用的居然是redhat,,这个让我好纠结啊,电脑上已经安装了ubuntu了,不知道这两个操作系统的区别,还是去了解一下吧。
|
Ubuntu Linux 网络安全
Linux上安装使用SSH(ubuntu&amp;&amp;redhat)
Ubuntu安装使用SSH ubuntu默认并没有安装ssh服务,如果通过ssh链接ubuntu,需要自己手动安装ssh-server。判断是否安装ssh服务,可以通过如下命令进行: xjj@xjj-desktop:~$ ssh localhost    s...
1885 0