- Details
- Category: Linux
Ubuntu 24.04 LTS - code name "Noble Numbat" - is the Long Term Release for servers and desktops that will be will be supported for 5 years until June 2029. It is the successor of 22.04 LTS.
- Details
- Category: Linux
This article is relevant for Ubuntu versions Ubuntu 20.04 or later using /etc/netplan configuration.
The configuration applicable can be done with editor nano in file is in file /etc/netplan/50-cloud-init.yaml:
sudo nano /etc/netplan/50-cloud-init.yaml
The configuration for WiFi is in section wifis: and the configuration for cable LAN is in section ethernets:
The indentation needs to be correct for the .yaml to work. Example to set the ethernet connection to a static IP 192.168.1.10 connected to router 192.168.1.1:
network:
ethernets:
eth0:
addresses:
- 192.168.1.10/24
gateway4: 192.168.1.1
nameservers:
addresses: [192.168.1.1]
optional: true
Example configuration for WiFi obtaining the IP address from DHCP:
network:wifis: wlan0: dhcp4: true optional: true access-points: "home network": password: "123456789"
To apply the netplan changes, enter:
sudo netplan apply
Alternatively, if you run into some issues use:
sudo netplan --debug apply
- Details
- Category: Linux
To change the computer name on Ubuntu, be it on your home server or an Ubuntu server in the cloud, you can proceed as follows:
- Type the hostnamectl command :
sudo hostnamectl set-hostname newNameHere
Delete the old name and setup new name. - Next, edit the /etc/hosts file:
sudo nano /etc/hosts
Replace any occurrence of the existing computer name with your new one. - Reboot the system to changes take effect:
sudo reboot