The command on CentOS 7

General support questions
Post Reply
User avatar
Posts: 1
Joined: 2019/06/20 00:57:05

The command on CentOS 7

Post by truyencuoi » 2019/06/20 01:03:16

Can I use CentOS 6 commands on CentOS 7?
For example:

Code: Select all

service nginx restart
CentOS beginner

User avatar
Posts: 2493
Joined: 2007/12/11 08:17:33
Location: Finland

Re: The command on CentOS 7

Post by jlehtone » 2019/06/20 06:24:08

Some of the "old commands" are mere wrappers for "new commands", but I would not rely on that.

Code: Select all

# service nginx status
Redirecting to /bin/systemctl status nginx.service
Your example, nginx, is in EPEL repository and the version for el7 has been configured to be a systemd service. Therefore, the "native" command is:

Code: Select all

# systemctl restart nginx
The upstream (RHEL-7) has extensive documentation. Use it. If you are not in a hurry, then focus on RHEL-8 for CentOS 8 is within feasible(*) future.

(*) Assessment ignores likelihood of global warming killing all humans.

Post Reply

Return to “CentOS 7 - General Support”