Home > Article > Operation and Maintenance > What is the difference between ubuntu and centos commands
Difference: 1. Centos uses the "service httpd" command to start and shut down the service, and ubuntu uses the "/etc/init.d/apache" command to start and shut down the service; 2. Centos uses the "yum upgrade" command to upgrade the system, and ubuntu uses the "yum upgrade" command to upgrade the system. Use the "atp-get" command to upgrade.
The operating environment of this article: centos 7 system, Dell G3 computer.
CentOS (Community ENTerprise Operating System) is one of the Linux distributions. It is a source released from Red Hat Enterprise Linux in accordance with open source code regulations. The code is compiled. Because it comes from the same source code, some servers that require high stability use CentOS instead of the commercial version of Red Hat Enterprise Linux.
Ubuntu is a Linux operating system mainly based on desktop applications. Ubuntu is based on the Debian distribution and the GNOME desktop environment. The difference from Debian is that it releases a new version every 6 months. The goal of Ubuntu is to provide general users with an up-to-date, yet fairly stable operating system that is primarily built with free software. Ubuntu has a huge community power, and users can easily get help from the community.
Both are service-level operating systems commonly used by individuals and small teams in the current version. Many open source software and libraries can be easily installed in the software libraries provided online. Both use bash as the basic shell, so in many basic commands, the difference between ubuntu and centos is not very obvious, and ubuntu does a better job in the desktop interface. It is the first choice for many people to learn Linux out of interest. Usually it is Ubuntu, after all, many people are still accustomed to operating under desktop graphics.
There are still many differences in usage habits and commands between Centos and Ubuntu. Here is a brief list:
1. The newly created non-root user in centos does not have sudo permissions. If necessary, To use sudo permissions, you must add accounts and permissions to /etc/sudoers, so when switching to the root account, you only need to enter: su and add the password of the root account.
In Ubuntu, the sudo command is generally used. If it is the first time you use it, you will be prompted to enter the current user's password (instead of the root password)
2. When installing software online, centos uses The yum command is used, while the apt-get command is used in ubuntu. In addition, there is a method in yum to search for a software from the software source. yum search software name
3. Centos comes from redhat, so centos supports installation in rpm format, while ubuntu obviously does not. Supported.
4. After all, different companies make different distributions. The locations of many configuration files and the default file paths are very different. This needs to be gradually realized during use.
The command differences are summarized in the following table:
Recommended tutorial: "centos tutorial"
The above is the detailed content of What is the difference between ubuntu and centos commands. For more information, please follow other related articles on the PHP Chinese website!