TOC & Recently Viewed

Recently Viewed Topics

Configuration of Static IP Addresses

Device List

Enter the following to view the current device list.

$ nmcli device status
DEVICE TYPE STATE CONNECTION
ens160 ethernet connected Wired connection 1
lo loopback unmanaged --

Note: The value in the DEVICE column.

Fetch Connection

Enter the following to fetch the connection associated with that device.

$ conn=$(nmcli -g general.connection device show ens160)
$ echo "$conn"

Static Connection

Enter the following to configure a static connection.

$ nmcli conection modify "$conn" connection.autoconnect yes ipv4.method manual ipv4.addr "10.0.0.1/24" ipv4.dns "10.0.1.1, 10.0.1.2" ipv4.gateway 10.0.0.254

Restart or Reboot the Connection

Enter the following to restart.

$ nmcli connection down "$conn" && nmcli connection up "$conn"

or

Enter one of the following to reboot.

$ systemctl reboot
$ shutdown -r now
$ reboot

 

Copyright 2017 Tenable, Inc. All rights reserved. Tenable Network Security, Nessus, SecurityCenter, SecurityCenter Continuous View and Log Correlation Engine are registered trademarks of Tenable, Inc.  Tenable, Tenable.io, Assure, and The Cyber Exposure Company are trademarks of Tenable, Inc.  All other products or services are trademarks of their respective owners.