내맘대로 Study/운영체제

[Linux] OS별 network 재시작 방법

jinkwon.kim 2021. 12. 6. 13:43
728x90
반응형

CentOS 6/ RHEL7/

service network  restart

CentOS 8

$sudo nmcli networking off
$sudo nmcli networking on

 

또는 

 

$sudo systemctl restart NetworkManager.service

Ubuntu 14

How to restart network in Ubuntu Server:

  1. /etc/init.d/networking restart script based command.
  2. service restart networking – Use service to run a System V init script such as networking.
  3. systemctl restart networking – Restart networking for the latest version of Ubuntu server.

Ubuntu 18 / 20 / 22 IP설정

/etc/netplan/00-installer-config.yaml 파일 수정

$ sudo netplan apply

Almalinux

#nmtui

https://linuxconfig.org/how-to-configure-static-ip-address-on-almalinux 

debian 9

파일

sudo nano /etc/network/interfaces

수정

auto eth0
iface eth0 inet static
    address 192.168.1.100
    netmask 255.255.255.0
    gateway 192.168.1.1

재 시작

sudo systemctl restart networking

 

 

 

728x90
반응형