Skip to content
hakk
  • Home
  • Blog
  • Docs
  • DSA
  • Snippets

Linux

  • Understanding the ss Command: A Modern Alternative to netstat 2025-11-01

    The ss command (short for socket statistics) is a fast, feature-rich replacement for the older netstat utility. It allows administrators to inspect and manage network sockets on a system — whether they’re TCP, UDP, RAW, or UNIX domain sockets. Compared to netstat, ss runs faster and provides more filtering options, making it invaluable for network diagnostics and system monitoring.

    Show All TCP, UDP, RAW, and UNIX Sockets

    ss -a -t -u -w -x
    

    Motivation: Network administrators often need a complete snapshot of all active sockets — to check which services are listening, what connections are established, or to detect unusual activity.

  • CentOS 9 Automated KVM Install Using Kickstart 2023-12-15

    A quick demo using virt-install and Kickstart to provision a new CentOS 9 virtual machine. This uses KVM (Kernel Virtual Machine) and libvirt to manage the VM. And uses Kickstart to setup and install the new system within the virtual machine.

    Creating kickstart file

    I’m going to post my Kickstart file on GitHub as a reference. It installs a headless server with some system admin tools, sets up networking, SELinux, and uses autopart to partition the disk with LVM support. This also assumes that you have setup a Bridge Network that is shared to KVM so the local network can be used instead of the libvirt network.

  • Convert Images to WebP using the Linux command line and Docker 2023-12-09

    The webp command line tool from Google makes it quite simple to convert images to the webp format from the command line. It can convert JPG, PNG, and TIFF images to WebP. Not sure what webp is? Read more about webp on Wikipedia.

    If you don’t have Docker installed on your system already, go ahead and install it now.

    Spin up a Debian Bookworm docker container and mount the directory with your images to the container.

  • Install OpenWRT x86 64 Using an A/B Partition Setup 2023-10-30

    A quick reference for OpenWRT Installation.

    Prepare a bootable Debian USB

    You can use another distro if you’d like. I use Debian as a personal perference and also because it’s relatively quick to create a live USB.

    Download a “standard” Debian ISO image from here https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/.

    At the time of writing, I’m using debian-live-12.2.0-amd64-standard.iso file. You may see a more recent version, but make sure you download the “-standard.iso” file. After downloading be sure to verify against the SHA256SUMS or SHA512SUMS.

Recent posts
  • Understanding the ss Command: A Modern Alternative to netstat
  • Understanding HTTP from Scratch with Python Sockets
  • When Environment Variables Mysteriously Reset...
  • How to Generate a 32-byte Key for AES Encryption
  • Streamlining Deployment: Installing Docker, Gitea, Gitea Act Runner, and Nginx on Ubuntu
© 2025 hakk
  • Home
  • Blog
  • Docs
  • DSA
  • Snippets