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

IPv4 Static Config

network:
    version: 2
    renderer: networkd
    ethernets:
        ens33:
            addresses:
                - 10.30.10.62/24
            nameservers:
                search: [vsphere.local]
                addresses: [10.30.10.1]
            routes:
                - to: default
                  via: 10.30.10.1

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/

Get A Youtube Channel's Videos

  1. Install yt-dlp
    1. sudo apt-get -y install yt-dlp
  2. Run yt-dlp and save the output to a text file
    1. yt-dlp --flat-playlist --print title "https://www.youtube.com/@DergEnterprises" > file.txt
  3. Wait for process to complete.
  4. View file
    1. cat file.txt

Install Curl

sudo apt-get -y install curl

Install Brave Browser

  1. Install Curl
  2. Download and install Brave Browser with Curl
    1. sudo curl -fsS https://dl.brave.com/install.sh | sh
  3. Run Brave Browser
    1. brave-browser
    2. or navigate the Application Menu

Full yt-dlp documentation at GitHub link

Install VLC

sudo snap install vlc
linux/ubuntu.txt · Last modified: by Name