Manually Change IP Address in Ubuntu (Versions 18.04 to 24.04)
Update your IP address without server reinstallation. Follow these step-by-step instructions to manually configure the network settings in Ubuntu.
Manual IP Change Instructions
Learn how to update your IP address without server reinstallation. Follow these step-by-step instructions to manually configure the network settings in Ubuntu.
Access Portal and Launch VNC
Log in to your
Enable your VNC server
Follow the instructions here
Open VNC
- Enter your username and password on the Ubuntu login page.
- The interface will look like the image below:
Identify Your Network Interface
- Open Terminal in the VNC session.
- Execute either of these commands to find your network interface name:
or
Take note of your interface name (e.g., ens3
or eth0
).
Edit the Netplan Configuration File
Navigate to the Netplan directory:
Open the configuration file (e.g., 50-cloud-init.yaml
):
Note: The filename might be different on your system (e.g., 01-network-manager-all.yaml
). Make sure to edit the correct file for your installation.
Change the IP Address
- Locate the current IP address line and replace it with your new IP address (e.g.,
172.16.30.15
). - Update the Gateway address in the routes section to match your new network configuration.
Configure Multiple IPs (Optional)
To add multiple IP addresses, use this format in your configuration:
Important: Maintain proper YAML indentation to avoid configuration errors.
Save Configuration
- Press
CTRL + X
to exit the editor - Press
Y
to confirm your changes - Press
Enter
to save the file
Apply Network Changes
Execute the following command to apply your new network configuration:
Verify Configuration
Check your new IP configuration using either command:
Or check a specific interface:
(Replace ens3
with your actual network interface name)
Was this page helpful?