Ubuntu Server 23.04 is the new version of Ubuntu for the business environment since, thanks to its various functions and features, it will allow a fully comprehensive management and one of the essential components in Ubuntu Server is its IP address; Let's remember that this IP address is the identifier before the world of networks and this IP allows clients and other processes on the local network to access the server's services. That is why it is important to know our IP and know how to configure it to achieve a good connection in our private network or local network, distributing appropriate addresses in each node that composes it..
This means that if this IP address changes we could be in trouble as the communication between the server and the client computers is affected, for security and as a basic rule at the server level it is ideal that the IP address of Ubuntu Server 23.04 be static, with We will be sure that it will always be the same IP, TechnoWikis will explain how to assign a static IP to the server.
To stay up to date, remember to subscribe to our YouTube channel!
SUBSCRIBE ON YOUTUBE
How to assign static IP on Ubuntu Server 23.04
Step 1
First we install the network utilities:
sudo apt install net-tools
Step 2
We enter the password and wait for the process to finish:
Step 3
Net-tools is a set of tools to control the network and Linux kernel subsystem with utilities like arp, ifconfig, netstat, rarp and utilities to manage network hardware like plipconfig, slattach, ii-tool and some options are integrated plus.
We observe the current IP with the command:
ip to
Step 4
We access the network configuration file:
cd /etc/netplan
step 5
We list the content:
ls
step 6
We access the configuration file using some editor:
sudo nano 00-installer-config-yaml
step 7
When accessing this file we will see the following:
step 8
We delete the line "Version: 2" and now we are going to enter the following:
dhcp: false addresses: [IP address/24] gateway: [IP address] nameservers: addresses: [IP address]
step 9
We save the changes using the following key combination:
Ctrl + O
We exit the editor using:
Ctrl + X
step 10
We update the network configuration:
sudo netplanapply
step 11
Check that the IP has been updated to the static address:
ip to
This is the simple process to set a static IP on Ubuntu Server 23.04..