Oracle Linux 8 : How to Restart Network Services (文档 ID 2579497.1)
APPLIES TO:
Linux OS - Version Oracle Linux 8.0 and later
Linux x86-64
GOAL
In Oracle Linux 8 the network services scripts are not presented anymore(systemctl start network.service or /etc/init.d/network script)
In order to restart the network services follow one of these two options.
SOLUTION
- Using Network Manager
# systemctl restart NetworkManager
- Using nmcli Tool
Note: Run these commands from the GUI or the console, as the network will disable.
====>>>务必注意:如下命令有使用的前提条件:那就是在机器旁边,
#nmcli networking off
#nmcli networking on
In case it is needed to run from the terminal from an ssh session, can be run it like this:
#nmcli networking off; nmcli networking on
====>>>务必注意:通过ssh远程连入服务器时,务必使用如上命令。
Note: It is recommendable to have accesses to the GUI or console in case the network doesn't come up.