Site Tools


linux:ubuntu

Linux - Ubuntu

Enable SSH

sudo apt-get update -y
sudo apt install ssh -y
sudo ufw allow ssh
sudo ufw enable && sudo ufw reload
sudo systemctl restart ssh

Mate Linux PC

  1. Based on Ubuntu 18.04

Default login version 20.10

  • username: user
  • password: Test123

Get Directory Size

du -shc *
Sample output:
257.4M  367dd405-ea434151-bd8a-09ab867bb76c
9.2G    6758744c-9b635be0-1781-e4434b827db8
1.4G    67587453-da7f1bdc-205b-e4434b827db8
2.1T    6783bc23-58cd10f8-12df-b8ca3a70f900
270.0M  8a2baa01-4b42f3b7-1a9b-75cfe518d634

Configure NTP

Ubuntu 24.04.1
To check Ubuntu version
	lsb_release -a
sudo apt update -y
sudo apt upgrade -y
sudo apt install chrony -y
sudo nano /etc/chrony/chrony.conf
	Configure NTP servers
	add
		allow
	or add
		allow 192.168.1.0/24
	or add
		allow 192.168.1.1/24
	save and quit
sudo systemctl restart chrony.service
sudo chronyc
	sources
		View NTP sources and statrum status
	exit

Configure firewall
sudo ufw allow 123/udp

IPv6 DNS Config

root@dns:/etc/netplan# cat 00-interfaces.yaml 
network:
    version: 2
    ethernets:
      ens34:
        dhcp4: no
        dhcp6: no
        addresses:
            - 2001:db8:1776:3000:a:ca:0:1f/112
        accept-ra: true
        nameservers:
            addresses:
                - 10.31.11.31
                - 2001:db8:1776:3000:a:ca:0:1f
            search:
                - ciscoworldtour.com
        routes:
            - to: default
              via: 2001:db8:1776:3000:a:ca:0:1
              metric: 1
              on-link: true

root@dns:/etc/netplan# netplan apply

https://black.host/hc/vps-hosting/enabling-ipv6-on-ubuntu-22-04-with-netplan/
linux/ubuntu.txt · Last modified: by adminent