More

    How to Assign Static IP Address to Ubuntu 20.04 LTS

    It is always recommended to assign a static IP address to the Linux system as the static IP address remains constant during reboot. Canonical has recently released its stable Ubuntu 20.04 LTS (Focal Fossa) operating system for desktops and servers. This article shows how to assign a static IP address to the Ubuntu 20.04 LTS server and desktop.

    Ubuntu 20.04 Assigning a static IP address to the LTSserver

    In the Ubuntu LTS 20.04, the network configuration is monitored and controlled by the network plan program. But during installation, cloudinit configures a dynamic ip to the server interface when the dhcp server is available. So, to configure a static IP, we first need to make sure that the network interface is not managed by the cloud-init.

    Open the file cloud-init /etc/cloud/cloud.cfg.d/subiquity-disabled cloudinit-networking.cfg and make sure the network: {config: disabled} field is present. If this record is missing, add it manually.

    Disable email security]:~$ cat /etc/cloud/cloud.cfg.d/subiquity cloudinit-networking.cfg
    Network: {configure: disabled}
    [Email security]:~$

    Use the ip addr show command from the console to display the IP address,

    [Secure email]:~$ ip add show]

    As you can see above, the enp0s3 interface card is automatically assigned a dynamic IP. To make this IP address static, we need to edit the netplan configuration file /etc/netplan/00-installer-config.yaml.

    email protection]:~$ sudo vi /etc/netplan/00-installer-config.yaml
    # This is a network configuration written by the subquity network
    :
    terrestrial networks :
    enp0s3 :
    dhcp4 : real version
    : 2

    The above standard inputs show that the enp0s3 interface receives an IP from a DHCP server. Since this is a jaml file, we need to make sure that the correct indentation is used when making changes to the file. Add the following lines to the yaml file,

    network:air:enp0s3 : addresses : 192.168.1.3/24]Gateway4: 192.168.1.1 1 name server: addresses: 4.2.2.2.2, 8.8.8.8] Version : 2

    to save and close the file.

    Execute the following grid plan apply command to apply the changes described above.

    [secure email]:~$ apply sudo netplan
    [secure email]:~$

    Now run the ip addr show and ip route show commands to see the IP address and route details.

    [Protected email]:~$ ip add show
    [Protected email]:~$ ip route show

    The retirement of the above team will be similar to that of the team below,

    The result confirms that the static IP address has been successfully assigned to the enp0s3 interface. Even if we reboot the server, this IP address remains consistent.

    Now let’s go to the Ubuntu 20.04 LTS office.

    Assignment of a static IP address for the Ubuntu office 20.04 LTS

    The network configuration of the Ubuntu desktop is checked by the network administrator. It is very easy to configure a static IP address on your Ubuntu 20.04 desktop. Log in to your desktop environment, click on the network icon and select your wired network settings.

    In the next window, click on the gear symbol below the wired option,

    In the next window, select the IPV4 tab, then select Manual and enter the IP address, Netmask, Gateway, and the IP address of the DNS server.

    Click Apply to save these changes and we need to disable and enable the interface once to assign an IP address.

    After turning the interface on and off and assigning a static IP address to the interface, we can check this by looking at the Details tab in the Wired Settings tab.

    Ideally, the above confirms that the static IP address has been successfully assigned to the interface. This is the end of the article; I hope these steps will help you to configure a static IP address on the Ubuntu server and the 20.04 LTS desktop. Give us your feedback and comments.ubuntu server 20.04 static ip address,ubuntu 20.04 static ip command line,ubuntu 20.04 set static ip command line,set static ip ubuntu 20.04 server,ubuntu 20.04 server static ip,ubuntu 20.04 network configuration command line,set static ip ubuntu 18.04 server,ubuntu 20.04 server network configuration

    Recent Articles

    X-rated ads on the derelict corner of the accountants’ website • Register

    A forgotten subdomain on PricewaterhouseCoopers’ dotcom has been hacked to promote pornographic sites and applications, which clearly shows why DNS records should not be...

    CERT-GIB records upsurge of phishing resource blockages as duration of attacks growsSecurity Affairs

    Group-B, a Singapour-based cyber security company, has noted an increase in the life expectancy of phishing attacks in the second half of 2019. This trend,...

    GSP COVID-19 App-The Peak of Neoliberal Paternalism or National Benevolence?

    There is no doubt that technology made life more bearable during the global pandemic. From the use of unmanned aircraft to deliver medicines and...

    Getting Zoom Security Right-8 Family and Friends Tips

    If you have read the newspaper or seen the news in recent weeks, you will notice a general topic discussed by all the major...

    Nemty Ransomware-Teaching by Doing

    Brief summary The 20th. In August 2019, McAfee’s Advanced Threat Research Group (ATR) discovered a new family of repayable programs called Nemti. This is a time...

    Related Stories