# data[].attributes.headline
Server Info (load, space, memory, ip, packages update)

# data[].attributes.subject
Server Info (load, space, memory, ip, packages update)

# data[].attributes.body
sudo passwd root

# data[].attributes.headline
Edit network setting : pico /etc/network/interfaces

# data[].attributes.subject
Edit network setting : pico /etc/network/interfaces

# data[].attributes.headline
Edit network setting : pico /etc/network/interfaces

# data[].attributes.subject
Edit network setting : pico /etc/network/interfaces

# data[].attributes.headline
Edit network setting : pico /etc/network/interfaces

# data[].attributes.subject
Edit network setting : pico /etc/network/interfaces

# data[].attributes.headline
Restart network setting : /etc/init.d/networking restart

# data[].attributes.subject
Restart network setting : /etc/init.d/networking restart

# data[].attributes.body
ip a

# data[].attributes.body
For years it’s been simple to set up DNS on a Linux machine. Just add a couple of entries to /etc/resolv.conf and you’re done.
# Use Google's public DNS servers.
nameserver 8.8.4.4
nameserver 8.8.8.8

But things change and now it’s not that simple. If you now edit /etc/resolv.conf on Ubuntu you’ll find that the edits are ephemeral. If you restart (or even hibernate) your machine then they’ll be overwritten by default content.
nameserver 127.0.0.53
search Home

This is pretty simple to fix though.

1. Install the resolvconf package:   apt install resolvconf

2. Edit /etc/resolvconf/resolv.conf.d/head

nameserver 8.8.4.4
nameserver 8.8.8.8

3. Restart the resolvconf service:
systemctl restart  resolvconf

# data[].attributes.body
ping google.com

# data[].attributes.body
apt  update;  apt  upgrade  -y; apt autoremove -y; apt autoclean

# data[].attributes.body
The method of configuring IP address on Ubuntu 18.04 LTS is significantly different than the older methods. Unlike the previous versions, the Ubuntu 18.04 uses Netplan , a new command line network configuration utility, to configure IP address.

Netplan has been introduced by Ubuntu developers in Ubuntu 17.10. In this new approach, we no longer use /etc/network/interfaces file to configure IP address rather we use a YAML file. The default configuration files of Netplan are found under /etc/netplan/ directory. In this brief tutorial, we are going to learn to configure static and dynamic IP address in Ubuntu 18.04 LTS minimal server.

apt  install  netplan.io

Configure Static IP Address In Ubuntu 18.04 LTS

default network configuration file:

$ ls /etc/netplan/
50-cloud-init.yaml

# nano /etc/netplan/50-cloud-init.yaml

network:
    version: 2
    renderer: networkd
    ethernets:
       ens5:
       dhcp4: no
       addresses: [192.168.1.230/24]
       gateway4: 192.168.1.254
       nameservers:
          addresses: [8.8.4.4,8.8.8.8]

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    eno1:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.0.1/24]
      gateway4: 192.168.0.1
      nameservers:
        addresses: [8.8.8.8, 1.1.1.1]
  wifis:
    wlp58s0:
      dhcp4: yes
      dhcp6: no
      access-points:
        "your-wifi-SSID-name":
          password: "your-wifi-password"

netplan   try

netplan  apply

netplan --debug apply

CHECK IP:
ip  a

# data[].attributes.body
To disable ipv6, open /etc/sysctl.conf and insert the following lines at the end:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

run command:

sysctl  -p

You will see this in the terminal:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

If you see 1, ipv6 has been successfully disabled.

-----------------------------

You can configure Ubuntu to prefer IPv4 over IPv6. This way you will be able to send emails and access IPv6-only sites. Edit /etc/gai.conf and uncomment (delete the '#') the following line:

precedence ::ffff:0:0/96 100

Surviving a Reboot

It turns that after these settings are configured, after a reboot they would disappear and IPv6 would be enabled again.

After some research there appears to be a bug in Ubuntu that prevents the sysctl settings from being loaded after a reboot.

The workaround for this is to create a new file /etc/rc.local and add these contents:

#!/bin/bash
# /etc/rc.local
# Load kernel variables from /etc/sysctl.d
/etc/init.d/procps restart
exit 0

Save and exit.

Next we need to make it executable.

chmod 755 /etc/rc.local

# data[].attributes.body
hostname
hostnamectl
hostnamectl   set-hostname    new_name

# data[].attributes.body
nano /etc/default/grub

1. Comment the line GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”, by adding # at the beginning, which will disable the Ubuntu purple screen.

2. Change GRUB_CMDLINE_LINUX=”" to GRUB_CMDLINE_LINUX=”text”, this makes Ubuntu boot directly into Text Mode.

3. Uncomment this line #GRUB_TERMINAL=console, by removing the # at the beginning, this makes Grub Menu into real black & white Text Mode (without background image)

Frun grub update and restart the system. Next time it will come up with terminal mode.

update-grub

DISABLE GUI
systemctl  set-default  multi-user.target

ENABLE GUI
systemctl  set-default  graphical.target