Login via ssh username@server-or-ip.
Copy files via SSH with the command scp source destination. You can
use user@server:path for remote sources or destinations.
Set the desired host name via hostnamectl set-hostname abc
/etc/hostsusually has the entry127.0.1.1 hostname, change this accordingly- For saltstack minions, also update
/etc/salt/minion_id - If you change a master to something other than
salt, be sure to update/etc/salt/minionon all minions
Install DNS multicast name resolution:
sudo apt-get install avahi-daemon
Note: to reach servers, append .local to server name
Ubuntu uses netplan to configure network interfaces. Edit
/etc/netplan/01-netcfg.yaml or /etc/netplan/00-installer-config.yaml. Under ethernets add the device with
its address. Here is an example configuration for a VBox machine with
two network adapters:
network:
version: 2
renderer: networkd
ethernets:
enp0s3:
addresses:
- 192.168.0.20/24
nameservers:
search: [ mydomain.com ]
addresses:
- 192.168.0.1
- 192.168.0.2
enp0s8:
dhcp4: yes
After changing the configuration, use netplan apply.
systemd-resolve --flush-caches
On newer Ubuntu servers (e.g. 22.04 LTS) it is
resolvectl flush-caches