12 Red Hat/Fedora/CentOS And Ubuntu Cross Reference Commands And Configuration Files
- Have you used Fedora/Red Hat/CentOS before and looking for equivalent commands in Ubuntu?
- Are you a Fedora/Red Hat/CentOS user looking for configuration files location in Ubuntu?
- Vice-versa?
If you answered yes to any of the above, read on. I am trying to help you start using Ubuntu without much Googling.
This post provides a brief introduction on available Fedora/Red Hat/CentOS equivalent commands in Ubuntu. This will also be handy for Ubuntu users that have delved into the Red Hat/Fedora/CentOS world.
GNU/Linux users familiar with Fedora/Red Hat/CentOS may have slight difficulty in using Ubuntu.
Normally default configuration file locations and some Red Hat/Fedora/CentOS specific commands differ. You will always find an alternative for the same in Ubuntu. Personally, I recommend Ubuntu to others for many reasons. In my opinion, other distros cannot beat Debian in package management and performance. Debian's rock solid core makes it so popular. Ubuntu brings to you the best of Debian and a well supported distribution. Sudoer keeps your system safe. Executing commands with sudo is safer than switching to su – mode.
| Services | Ubuntu | Red Hat/CentOS/Fedora |
|---|---|---|
| Apache | /etc/apache2/apache2.conf | /etc/httpd/conf/httpd.conf |
| PHP | /etc/php5/apache2/php.ini | /etc/php.ini |
| MYSQL | /etc/mysql/my.cnf | /etc/my.cnf |
| Repositories configuration | /etc/apt/sources.list | etc/yum.conf |
| Package file extension | *.deb | *.rpm |
| Install package from repositories | apt-get | yum |
| Install a package file | dpkg --install | rpm -i |
| Refresh list of available packages | apt-get update | Yum refreshes every use |
| Edit run level | sysv-rc-conf(may have to install | chkconfig |
| Version | cat /etc/issue | cat /etc/redhat-release |
| Off-line package management | APTonCD | opyum |
| Run as root | sudo -s , sudo -i | su - |
To start, stop or restart a service you might have used /etc/init.d/
/etc/init.d/vsftpd restart
in Red Hat/Fedora/CentOS. This works seamlessly in Ubuntu. You can use the same syntax in Ubuntu.
Some people use service command to stop, start and restart services.
service <service_name> start|restart|stop
Example: service vsftpd restartThe service command is not supported in Ubuntu.
Some service names differ in Ubuntu. In Ubuntu httpd is replaced with apache2, network with networking, etc. To restart apache in Ubuntu use
/etc/init.d/apache2 restartPS: My intention is not to start a distro war.









Errata in package management.
Columns in package management got confused. In redhat/* you use rpm, in Ubuntu/Debian dpkg. They appear swapped.
Hello Carles Mateu
Thanks for correcting, I fixed it.
It sure helps to know your
It sure helps to know your way around distros. If you are a Fedora/Red Hat/CentOS user and your customer has an Ubuntu server you don't have to worry too much if you know where to look at. If you are a GNU/Linux system administrator with rich experience in Red Hat/CentOS, you may want to know stuff about Ubuntu/Debian to be able to work without hassles in an organization that predominantly uses Debian/Ubuntu. If you are a GNU/Linux service provider your customer may expect you to know how to work on all major distros.
With warm regards,
Sudheer
Post new comment