CentOS 7 / RHEL 7 / Fedora Linux (many other modern distor) uses Systemd. It is a system and service manager for Linux operating systems. In newer distro such as CentOS7/RHEL7 systemd replaces Upstart as the default init system. [donotprint]
|Requirements||CentOS/RHEL 7 |
Fedora Linux latest
In older versions of CentOS or Red Hat Enterprise Linux, you used init scripts located in the /etc/rc.d/init.d/ directory. These init scripts were typically written in Bash, and allowed the system administrator to control the state of services and daemons in their system. In CentOS/RHEL 7, these init scripts have been replaced with service units.
CentOS 7 / RHEL 7 networking service name
To bring up/down networking service you need to use the network.service.
Say hello to systemctl command
Use this command to control the systemd system and act as a service manager.
CentOS 7 / RHEL 7 get status of network service
sudo systemctl status network.service
sudo systemctl status network
CentOS 7 / RHEL 7 restart network service
sudo systemctl restart network.service
sudo systemctl restart network
CentOS 7 / RHEL 7 start network service
sudo systemctl start network.service
sudo systemctl start network
CentOS 7 / RHEL 7 stop network service
sudo systemctl stop network.service
sudo systemctl stop network
A note about old service and chkconfig command
The service and chkconfig commands are still available in the system and work as expected, but are only included for compatibility reasons and should be avoided as may be dropped in future release.
🐧 14 comments so far... add one ↓
|Category||List of Unix and Linux commands|
|Firewall||Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04|
|Network Utilities||dig • host • ip • nmap|
|OpenVPN||CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04|
|Package Manager||apk • apt|
|Processes Management||bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time|
|Searching||grep • whereis • which|
|User Information||groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w|
|WireGuard VPN||Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04|