0% found this document useful (0 votes)
115 views1 page

Ubuntu Server Static IP Setup

This document provides a step-by-step guide for setting up a static IP on Ubuntu Server 24.04 using the command line interface. It includes instructions for checking the network interface name, editing the Netplan configuration file, applying the new settings, and verifying the configuration. Following these steps will successfully configure the server to use a static IP address.

Uploaded by

mustafa810
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
115 views1 page

Ubuntu Server Static IP Setup

This document provides a step-by-step guide for setting up a static IP on Ubuntu Server 24.04 using the command line interface. It includes instructions for checking the network interface name, editing the Netplan configuration file, applying the new settings, and verifying the configuration. Following these steps will successfully configure the server to use a static IP address.

Uploaded by

mustafa810
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Ubuntu Server 24.

04 – Static IP Setup (CLI)

1. Check Interface Name:


Run the following command to check the name of your network interface:

ip a

2. Edit Netplan Config:


Open the Netplan configuration file (usually 00-installer-config.yaml):

sudo nano /etc/netplan/00-installer-config.yaml

3. Use this Configuration Format:


network:
version: 2
ethernets:
enp0s3: # Change this to your interface name
dhcp4: false
addresses:
- 192.168.1.100/24 # Your static IP & subnet
gateway4: 192.168.1.1 # Your default gateway
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4

4. Apply the Configuration:


Save the file and apply the settings using:

sudo netplan apply

5. Verify the Configuration:


Check if the IP and routes are correctly set:

ip a
ip route

✅ Done! Your Ubuntu server now uses a static IP.

You might also like