root@t1 ~ # df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 382M 1.2M 381M 1% /run
/dev/sda1 38G 3.7G 33G 11% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sda15 253M 146K 252M 1% /boot/efi
tmpfs 382M 12K 382M 1% /run/user/0
root@t1 ~ # swapon --show
root@t1 ~ # sudo fallocate -l 2G /swapfile
root@t1 ~ # sudo chmod 600 /swapfile
root@t1 ~ # sudo mkswap /swapfile
Setting up swapspace version 1, size = 2 GiB (2147479552 bytes)
no label, UUID=1f06505a-418f-49a6-a527-eb68facffcaa
root@t1 ~ # swapon --show
free -h
total used free shared buff/cache available
Mem: 3.7Gi 834Mi 872Mi 6.0Mi 2.3Gi 2.9Gi
Swap: 0B 0B 0B
root@t1 ~ # echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
/swapfile none swap sw 0 0
root@t1 ~ # cat /proc/sys/vm/swappiness
60
root@t1 ~ # sudo sysctl vm.swappiness=10
vm.swappiness = 10
root@t1 ~ # echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
vm.swappiness=10
root@t1 ~ # reboot
root@t1 ~ # Welcome to Ubuntu 24.04.3 LTS (GNU/Linux 6.8.0-87-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
System information as of Fri Oct 31 05:32:48 PM UTC 2025
System load: 0.0 Processes: 203
Usage of /: 9.7% of 37.23GB Users logged in: 0
Memory usage: 18% IPv4 address for eth0: 49.13.XX.XX
Swap usage: 0% IPv6 address for eth0: 2a01:4f8:XXX:XXXX::1
* Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
just raised the bar for easy, resilient and secure K8s cluster deployment.
https://ubuntu.com/engage/secure-kubernetes-at-the-edge
Expanded Security Maintenance for Applications is not enabled.
0 updates can be applied immediately.
Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status
Last login: Fri Oct 31 17:32:49 2025 from 45.XX.X.XXX
root@t1 ~ # free -h
total used free shared buff/cache available
Mem: 3.7Gi 690Mi 2.7Gi 5.7Mi 604Mi 3.1Gi
Swap: 2.0Gi 0B 2.0Gi