System Information
- Linux kernel version
-
uname -r
-
Print hostname (a unique name that identifies a device connected to
a computer network)
-
hostname
- IP Addresses attached to the network interfaces
-
hostname -I
- List network names
-
ls /sys/class/net
-
List all network interfaces and their ip addresses / mac addresses
-
ip addr show
-
Disable a specific network interface (for example: named: wlp2s0)
-
sudo ip link set wlp2s0 down
When we list the network interfaces, we will see "DOWN" next to the
interface
-
Enable a specific network interface (for example: named: eno1)
-
sudo ip link set eno1 up
When we list the network interfaces, we will see "UP" next to the
interface
- In Ubuntu server console, to increase the font-size
-
Update/add
/etc/default/console-setup
file with the
following:
FONTSIZE="16x32"
After update restart service - console-setup
sudo service console-setup restart
- Set static ip address
-
Create
/etc/netplan/00-installer-config.yaml
sudo touch /etc/netplan/00-installer-config.yaml
Set file permissions to 600
sudo chmod 600 /etc/netplan/00-installer-config.yaml
Example netplan config
network:
version: 2
ethernets:
eno1:
dhcp4: false
addresses:
- 192.168.86.50/24
routes:
- to: 0.0.0.0/0
via: 192.168.86.1
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4
Apply netplan
sudo netplan apply