+5 votes
196 views
How to Configure Static IP on Ubuntu Server 23.04

in Linux/Unix by (551k points)
reopened | 196 views

1 Answer

+3 votes
Best answer

How to assign static IP on Ubuntu Server 23.04

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:

 

 

 

 

image

 

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 
image

 

Step 4

We access the network configuration file:
 cd /etc/netplan 
step 5

We list the content:
 ls 
image

 

step 6

We access the configuration file using some editor:
 sudo nano 00-installer-config-yaml 
image

 

step 7

When accessing this file we will see the following:

 

image

 

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] 
image

 

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 
image

 

step 11

Check that the IP has been updated to the static address:
 ip to 
image

 

This is the simple process to set a static IP on Ubuntu Server 23.04..

 

 


by (3.5m points)
edited

Related questions

+3 votes
1 answer
+3 votes
1 answer
+5 votes
1 answer
+4 votes
1 answer
asked Dec 1, 2022 in Linux/Unix by backtothefuture (551k points) | 120 views
+4 votes
1 answer
asked Jun 13, 2023 in Linux/Unix by backtothefuture (551k points) | 79 views
Sponsored articles cost $40 per post. You can contact us via Feedback
10,634 questions
10,766 answers
510 comments
3 users