Skip to content

Instantly share code, notes, and snippets.

@victor-abz
Last active May 26, 2023 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save victor-abz/31c18345ef77d907630563689174fe6a to your computer and use it in GitHub Desktop.
Save victor-abz/31c18345ef77d907630563689174fe6a to your computer and use it in GitHub Desktop.
Network setup on centos
  1. View network interfaces by nmcli -p dev // to check network port

  2. Edit /etc/sysconfig/network-scripts/ifcfg-networkdevicename

  3. press i for editing and change the following

DEVICE=device_name
BOOTPROTO=none
ONBOOT=yes
PREFIX=8 # network prefix
IPADDR=xxx.xx.xx.xx

After editing press esc and type :wq to save and exit.

  1. Bring the Interface Up using ncmli

You can view device uuid using

nmcli connection show nmcli con up uuid "Device UUID"

https://serverspace.io/support/help/configuring-network-on-centos/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment