Today, we are going to learn How to Configure Static IP Address on Ubuntu 22.04. This tutorial will cover on how we will configuring a static ip address on ubuntu 22.04.
What is Static IP addresses?
If your computer is hosting a web server, its IP address is what identifies it to the rest of the Internet. A computer on the Internet can have a static IP address, which means it stays the same over time, or a dynamic IP address, which means the address can change over time.
Step on How to Configure Static IP Address on Ubuntu 22.04:
- Step 1: Check device name
- Step 2: Create a Static connection
- Step 3: Add DNS IP to static-ip
- Step 4: Activate the Static connection
- Step 5: Verify the IP assignment to the selected device
- Step 6: Conclusion
Also Read: How to Install and Configure phpMyAdmin in Ubuntu 22.04
Step 1: Check device name
First open a terminal or command line using the following command.
nmcli connection show
Step 2: Create a Static connection
Use the following command to create a new static connection named “static ip”.
sudo nmcli con add type ethernet con-name 'static-ip' ifname emp0s3 ipv4.method manual ipv4.addresses 192.168.1.102/24 gw4 192.168.1.1
Also Read: How to Install and Run PHP 8.x on Ubuntu 20.04
Step 3: Add DNS IP to static-ip
Execute the following command to add the DNS IP to the “static-ip” connection.
sudo nmcli con mod static-ip ipv4.dns 192.168.1.1
Step 4: Activate the Static connection
Execute the following command on command lien to active “static-ip” connection.
sudo nmcli con up id 'static-ip'
Also Read: How to Setup Nginx with Let’s Encrypt on Ubuntu 22.04
Step 5: Verify the IP assignment to the selected device
Run the “ip” command with the “a” option to validate the assigned IP.
ip a
Check Internet connectivity using the following command.
ping google.com
Step 6: Conclusion
Today, We had learn How to Configure Static IP Address on Ubuntu 22.04. Hope this tutorial helped you with learning Ubuntu. If you have any question you can ask us at comment section below. If you like the tutorial please subscribe our YouTube Channel and follow us on social network Facebook and Instagram.
Also Read: How to Install Node.js and NPM in Ubuntu 22.04 Example