Linuxips
  • Home
  • Linux
  • Debian
  • Ubuntu
  • Fedora
  • Arch Linux
No Result
View All Result
Linuxips
  • Home
  • Linux
  • Debian
  • Ubuntu
  • Fedora
  • Arch Linux
No Result
View All Result
Linuxips
No Result
View All Result
Home Debian

How to Configure Static IP Address on Ubuntu

admin by admin
January 24, 2023
Reading Time: 3 mins read
0
How to Configure Static IP Address on Ubuntu

In this article, we are going to learn how to configure a static IP address on Ubuntu 22.04. Typically, in most network configurations, the IP address is assigned dynamically by the router’s DHCP server. Setting a static IP address may be required in different situations, such as configuring port forwarding or running a media server or other service which is needed a static IP address.

Contents hide
1 Prerequisites
2 In this tutorial you will learn how to:
3 Static IP Address on Ubuntu
3.1 GUI Interface Mode
3.2 Command Linux Interface Mode
4 Conclusion
4.1 Related Linux Tutorials:

Prerequisites

  • Ubuntu system
  • User with Sudo privileges

In this tutorial you will learn how to:

  • Set the static IP address on Ubuntu Desktop using a NetworkManager
  • Configure the static IP address on the Ubuntu server via the network daemon

Static IP Address on Ubuntu

There are two ways to configure static IP addresses on Ubuntu.

  • GUI Interface Mode
  • Command Linux Interface Mode

GUI Interface Mode

The simplest approach how to configure a static IP address on Ubuntu Desktop is via GNOME graphical user interface:

Go to Settings > Network > Click on the Setting icon.  Click on IPv4 > Select the manual option. And then enter your static IP address.

IP Address on Ubuntu

Command Linux Interface Mode

To configure a static IP address on your Ubuntu server you need to modify a relevant netplan network configuration file within the /etc/netplan/ directory.

Command Linux Interface Mode

To set your network interface enp0s3 to static IP address 192.168.1.233 with gateway 192.168.1.1 and DNS server as 8.8.8.8 and 8.8.4.4 replace the above configuration with the one below.

# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
 version: 2
 renderer: networkd
 ethernets:
   ens33:
     dhcp4: no
     addresses: [192.168.3.3/24]
     gateway4: 192.168.3.1
     nameservers:
       addresses: [8.8.8.8,8.8.4.4]

Ubuntu Server IP Configuration

Note You have to edit the configuration file the same as you can see above. Otherwise, you will get an error while you apply the changes.

Ubuntu server configured with the static IP address. Now you can deploy any service over here.

Once ready apply changes with:

$ sudo netplan apply

In case you run into some issues execute:

$ sudo netplan --debug apply

Conclusion

That is all! In this article, you have learned about static IP addresses on the Ubuntu system. Now you can easily change your IP address if you do not want the DHCP server IP address.  All the commands and procedures described in this article are also valid for Debian, Mint, and previous Ubuntu releases.

Related Linux Tutorials:

  • How to Install Cisco Packet Tracer on Ubuntu.
  • How to install Tweak Tool on Ubuntu 21.04.
  • ZSH to BASH | How to Install ZSH on Ubuntu.
  • How to Install Ubuntu.
  • How to Install PuTTY on Ubuntu
ShareTweetSendShareShare
Previous Post

How to Install Ubuntu Server 22.04 LTS

Next Post

How to Install Ubuntu 22.10 | Ubuntu for Desktop

admin

admin

Linuxips is a Linux blog that publishes articles and tutorials about server operations, installations, new techniques and Linux security.

Related Posts

How To Use AppImage in Linux
Linux

How To Use AppImage in Linux [Complete Guide]

April 2, 2023
How To Install uGet Download Manager On Ubuntu
Linux

How To Install uGet Download Manager On Ubuntu

March 8, 2023
How to Install ZSH on Ubuntu 22.10
Ubuntu

How to Install ZSH on Ubuntu 22.10

March 7, 2023
How to Install Terminator on Ubuntu
Ubuntu

How to Install Terminator on Ubuntu, a Linux Terminal Emulator

March 2, 2023
How to Install Tweak Tool on Ubuntu
Ubuntu

How to install Tweak Tool on Ubuntu 22.04

February 28, 2023
How to Install Ubuntu 22.10 (Kinetic Kudu)
Ubuntu

How to Install Ubuntu 22.10 | Ubuntu for Desktop

January 26, 2023

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

You might also like

Install ZSH on Arch Linux

How to Install ZSH on Arch Linux

January 6, 2024
How to Install ZSH on Kali Linux 2024.1

How to Install ZSH on Kali Linux

January 5, 2024
How To Use AppImage in Linux

How To Use AppImage in Linux [Complete Guide]

April 2, 2023
How To Install uGet Download Manager On Ubuntu

How To Install uGet Download Manager On Ubuntu

March 8, 2023
How to Install ZSH on Ubuntu 22.10

How to Install ZSH on Ubuntu 22.10

March 7, 2023
Linux Files and Directories

Linux Files and Directories

March 3, 2023

© 2024 Linuxips.com - Linux Tips, Tricks and Tutorials.

  • Home
  • Web Stories
  • Privacy Policy
  • Contact Us
  • Disclaimer
No Result
View All Result
  • Home
  • Linux
  • Debian
  • Ubuntu
  • Fedora
  • Arch Linux

© 2024 Linuxips.com - Linux Tips, Tricks and Tutorials.