SlideShare a Scribd company logo
Setup Ip address manually using nmcli command
To display all the active network interfaces on your Linux system execute the
command.
$ nmcli connection show
OR
$ nmcli con show
$ nmcli connection show
OR
$ nmcli con show
Note that con is the truncated form of connection and you will still end up with
the same result as shown.
Check Active Network Interfaces
Also, you can run the command below to display both active and inactive
interfaces.
$ nmcli dev status
Check All Network Interfaces
Set Static IP Address Using nmcli Tool
Using nmcli tool, you can modify a network interface to use a static IP
address. In this example, we will modify the network interface enps03 to use a
static IP.
But first, let’s check the IP address using IP command.
$ ip addr
Check Network IP Address
The current IP address is 192.168.2.104 with a CIDR of /24. We are going to
configure a static IP with the following values:
IP address: 192.168.2.20/24
Default gateway: 192.168.2.1
Preferred DNS: 8.8.8.8
IP addressing static
First, run the command below to set up the IP address.
$ nmcli con mod enps03 ipv4.addresses 192.168.2.20/24
Next, configure the default gateway as shown:
$ nmcli con mod enps03 ipv4.gateway 192.168.2.1
Then set up the DNS server:
$ nmcli con mod enps03 ipv4.dns ā€œ8.8.8.8ā€
Next , change the addressing from DHCP to static.
$ nmcli con mod enps03 ipv4.method manual
Set Static IP in RHEL 8
To save the changes, run the command
$ nmcli con up enps03
Active IP Address of Network
The changes will be written to /etc/sysconfig/network-scripts/ifcfg-
enps03 file.
To confirm the IP, once again run the command:
$ ip addr enps03
Check IP Address
Additionally, you can view the /etc/sysconfig/network-scripts/ifcfg-
enps03 file using cat command.
$ cat /etc/sysconfig/network-scripts/ifcfg-enps03
View Network Interface File
And this concludes this guide on configuring network connection using ā€˜nmcli’
command-line tool on Linux. We hope you found this guide helpful.

More Related Content

DOC
HOW to fix a HMAC error
PDF
Dns server in packet tracer by tanjilur rahman city university bangladesh
PPT
Capistrano
PPT
Capistrano Overview
DOCX
_.com_To_.co.in_Doc.docx
PDF
Self Created Load Balancer for MTA on AWS
PPTX
ops300 Week8 gre
PPTX
TCPIP Networks for DBAs
HOW to fix a HMAC error
Dns server in packet tracer by tanjilur rahman city university bangladesh
Capistrano
Capistrano Overview
_.com_To_.co.in_Doc.docx
Self Created Load Balancer for MTA on AWS
ops300 Week8 gre
TCPIP Networks for DBAs

What's hot (17)

PDF
DNS 101: Introducción a DNS en Español
PDF
CentOS Server CLI Configuration (Nmcli & Hosts)
PDF
Automate Cisco Switch Configuration Backups with KRON
PDF
Linux class 15 26 oct 2021
PPTX
Intro to MQ
PDF
Internet of dusty things
PDF
Strongswan ipsec vpn_linux_strongswan_ip
KEY
Ruby 1.9 Introduction
PPTX
Cyclone + Eventsource (realtime push-ŃŠ¾Š¾Š±Ń‰ŠµŠ½ŠøŃ)
PDF
Use TestRPC in Remix
Ā 
PPTX
Smtp server q&a webinar
PDF
Gemless
PDF
Java in the Past, Java in the Future
PPTX
Dns
Ā 
PDF
Anaysing your logs with docker and elk
PPTX
How can I use GNU cotreutils & other command line tools to get a sorted list ...
DNS 101: Introducción a DNS en Español
CentOS Server CLI Configuration (Nmcli & Hosts)
Automate Cisco Switch Configuration Backups with KRON
Linux class 15 26 oct 2021
Intro to MQ
Internet of dusty things
Strongswan ipsec vpn_linux_strongswan_ip
Ruby 1.9 Introduction
Cyclone + Eventsource (realtime push-ŃŠ¾Š¾Š±Ń‰ŠµŠ½ŠøŃ)
Use TestRPC in Remix
Ā 
Smtp server q&a webinar
Gemless
Java in the Past, Java in the Future
Dns
Ā 
Anaysing your logs with docker and elk
How can I use GNU cotreutils & other command line tools to get a sorted list ...
Ad

Similar to Setup ip address manually using nmcli command (20)

PDF
configure a DHCP server on Fedora.pdf
PDF
How to Set Static IP Address on Ubuntu 2404 4 Possible Methods.pdf
PPTX
PPTX
DNS,SMTP and POP3
PDF
How to Change an IP Address on Debian 12.pdf
DOCX
Saad baig practical file
PDF
Manage Networking in RHEL - RHCSA (RH124).pdf
DOC
Arp Dan Ipconfig Syntax
PDF
CEH v12 Lesson 4 _ NTP, DNS _ Other Network En (1).pdf
PDF
Dhcp commandas
PDF
c bstatC nslookupDefault Server pdc.corp.example.comAdd.pdf
PDF
š“šØš© šˆš š‚šØš¦š¦ššš§šš¬ šŸšØš« š–š¢š§ššØš°š¬
PDF
Boost your network troubleshooting skills with Top Usefeul IP Commands for wi...
PDF
Explore Top IP Commands for Windows - InfosecTrain.pdf
PDF
Top IP Commands for Windows : Boost your network troubleshooting skills with ...
PDF
Top Useful IP Commands for Windows.pdf
PDF
Vpn addind technique
DOCX
Networking DHCP server Setup Reports
PPTX
Mininet demo
DOCX
M7 - Manual
configure a DHCP server on Fedora.pdf
How to Set Static IP Address on Ubuntu 2404 4 Possible Methods.pdf
DNS,SMTP and POP3
How to Change an IP Address on Debian 12.pdf
Saad baig practical file
Manage Networking in RHEL - RHCSA (RH124).pdf
Arp Dan Ipconfig Syntax
CEH v12 Lesson 4 _ NTP, DNS _ Other Network En (1).pdf
Dhcp commandas
c bstatC nslookupDefault Server pdc.corp.example.comAdd.pdf
š“šØš© šˆš š‚šØš¦š¦ššš§šš¬ šŸšØš« š–š¢š§ššØš°š¬
Boost your network troubleshooting skills with Top Usefeul IP Commands for wi...
Explore Top IP Commands for Windows - InfosecTrain.pdf
Top IP Commands for Windows : Boost your network troubleshooting skills with ...
Top Useful IP Commands for Windows.pdf
Vpn addind technique
Networking DHCP server Setup Reports
Mininet demo
M7 - Manual
Ad

More from Ganesh Bhosale (20)

DOCX
3.AWR and ASH Reportsfor Oracle Tuning.docx
DOCX
Step by stepDoc for Oracle TuningsandAWR.docx
PPTX
2.Python_Testing_Using_PyUnit_PyTest.pptx
PPTX
1.Python_Testing_Using_PyUnit_Pytest.pptx
PPTX
2.Python_Unit _Testing_Using_PyUnit_Pytest.pptx
PPTX
awsfundamentals1_cloud_Infrastructure.pptx
PPTX
Generators-in-Python-for-Developers.pptx
PPTX
Advance-Python-Iterators-for-developers.pptx
PPTX
The ES Library for JavaScript Developers
PPTX
Git Repository for Developers working in Various Locations
PPTX
4.Problem Solving Techniques and Data Structures.pptx
PPTX
3.Problem Solving Techniques and Data Structures.pptx
PPTX
2.Problem Solving Techniques and Data Structures.pptx
PPTX
1. Problem Solving Techniques and Data Structures.pptx
PPTX
unittestinginpythonfor-PYDevelopers.pptx
PPTX
SQL-queries-for-Data-Analysts-Updated.pptx
PPTX
javascriptbasicsPresentationsforDevelopers
PPTX
Cloud-Architecture-Technology-Deovps-Eng
PDF
Backup-and-Recovery Procedures decribed in AWS
PPTX
KMSUnix and Linux.pptx
3.AWR and ASH Reportsfor Oracle Tuning.docx
Step by stepDoc for Oracle TuningsandAWR.docx
2.Python_Testing_Using_PyUnit_PyTest.pptx
1.Python_Testing_Using_PyUnit_Pytest.pptx
2.Python_Unit _Testing_Using_PyUnit_Pytest.pptx
awsfundamentals1_cloud_Infrastructure.pptx
Generators-in-Python-for-Developers.pptx
Advance-Python-Iterators-for-developers.pptx
The ES Library for JavaScript Developers
Git Repository for Developers working in Various Locations
4.Problem Solving Techniques and Data Structures.pptx
3.Problem Solving Techniques and Data Structures.pptx
2.Problem Solving Techniques and Data Structures.pptx
1. Problem Solving Techniques and Data Structures.pptx
unittestinginpythonfor-PYDevelopers.pptx
SQL-queries-for-Data-Analysts-Updated.pptx
javascriptbasicsPresentationsforDevelopers
Cloud-Architecture-Technology-Deovps-Eng
Backup-and-Recovery Procedures decribed in AWS
KMSUnix and Linux.pptx

Recently uploaded (20)

PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
master seminar digital applications in india
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
Cell Structure & Organelles in detailed.
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Complications of Minimal Access Surgery at WLH
PDF
BƀI Tįŗ¬P Bį»” TRỢ 4 KỸ NĂNG TIįŗ¾NG ANH 9 GLOBAL SUCCESS - Cįŗ¢ NĂM - BƁM SƁT FORM Đ...
PDF
Pre independence Education in Inndia.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
Institutional Correction lecture only . . .
PDF
Insiders guide to clinical Medicine.pdf
Microbial diseases, their pathogenesis and prophylaxis
master seminar digital applications in india
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Cell Structure & Organelles in detailed.
O7-L3 Supply Chain Operations - ICLT Program
human mycosis Human fungal infections are called human mycosis..pptx
Microbial disease of the cardiovascular and lymphatic systems
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Final Presentation General Medicine 03-08-2024.pptx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Complications of Minimal Access Surgery at WLH
BƀI Tįŗ¬P Bį»” TRỢ 4 KỸ NĂNG TIįŗ¾NG ANH 9 GLOBAL SUCCESS - Cįŗ¢ NĂM - BƁM SƁT FORM Đ...
Pre independence Education in Inndia.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Institutional Correction lecture only . . .
Insiders guide to clinical Medicine.pdf

Setup ip address manually using nmcli command

  • 1. Setup Ip address manually using nmcli command To display all the active network interfaces on your Linux system execute the command. $ nmcli connection show OR $ nmcli con show $ nmcli connection show OR $ nmcli con show Note that con is the truncated form of connection and you will still end up with the same result as shown. Check Active Network Interfaces Also, you can run the command below to display both active and inactive interfaces.
  • 2. $ nmcli dev status Check All Network Interfaces Set Static IP Address Using nmcli Tool Using nmcli tool, you can modify a network interface to use a static IP address. In this example, we will modify the network interface enps03 to use a static IP. But first, let’s check the IP address using IP command. $ ip addr
  • 3. Check Network IP Address The current IP address is 192.168.2.104 with a CIDR of /24. We are going to configure a static IP with the following values: IP address: 192.168.2.20/24 Default gateway: 192.168.2.1 Preferred DNS: 8.8.8.8 IP addressing static First, run the command below to set up the IP address. $ nmcli con mod enps03 ipv4.addresses 192.168.2.20/24 Next, configure the default gateway as shown:
  • 4. $ nmcli con mod enps03 ipv4.gateway 192.168.2.1 Then set up the DNS server: $ nmcli con mod enps03 ipv4.dns ā€œ8.8.8.8ā€ Next , change the addressing from DHCP to static. $ nmcli con mod enps03 ipv4.method manual Set Static IP in RHEL 8 To save the changes, run the command $ nmcli con up enps03
  • 5. Active IP Address of Network The changes will be written to /etc/sysconfig/network-scripts/ifcfg- enps03 file. To confirm the IP, once again run the command: $ ip addr enps03 Check IP Address Additionally, you can view the /etc/sysconfig/network-scripts/ifcfg- enps03 file using cat command. $ cat /etc/sysconfig/network-scripts/ifcfg-enps03
  • 6. View Network Interface File And this concludes this guide on configuring network connection using ā€˜nmcli’ command-line tool on Linux. We hope you found this guide helpful.