Thursday, September 10, 2026

How to Install Docker Engine on Ubuntu: Step-by-Step Guide

 


Docker has become one of the most important tools in modern software development, DevOps, cloud engineering, and system administration.

Whether you are building microservices, running databases, deploying web applications, experimenting with Kubernetes, or setting up an AI development environment, Docker provides a consistent way to package and run applications.

In this guide, we'll install Docker Engine on Ubuntu using Docker's official APT repository.

The process is straightforward and works well for developers, DevOps engineers, SREs, system administrators, and anyone learning containerization.


🐳 What Is Docker?

Docker is a containerization platform that allows applications and their dependencies to run inside isolated environments called containers.

Instead of installing every application dependency directly onto your Ubuntu system, you can package an application into a container and run it consistently across different environments.

A typical Docker workflow looks like this:

Application
     ↓
Dockerfile
     ↓
Docker Image
     ↓
Docker Container
     ↓
Application Running

For example, instead of installing a database directly on Ubuntu, you could run PostgreSQL inside a Docker container.


🧩 Prerequisites

Before installing Docker, make sure you have:

  • An Ubuntu system
  • Internet connectivity
  • A user with sudo privileges
  • A terminal
  • Basic familiarity with Linux commands

It is also a good idea to update your system before starting.


🚀 Step 1: Update Ubuntu

Open Terminal:

Ctrl + Alt + T

Then run:

sudo apt update && sudo apt upgrade -y

This updates the package index and installs available package upgrades.

Depending on how recently your system was updated, this may take a few minutes.


📦 Step 2: Install Required Dependencies

Docker's repository setup requires several supporting packages.

Install them with:

sudo apt install -y ca-certificates curl gnupg lsb-release

These packages provide tools required to securely access and configure external APT repositories.


🔐 Step 3: Add Docker's Official GPG Key

Create the directory used to store APT repository keys:

sudo mkdir -p /etc/apt/keyrings

Now download Docker's official GPG key:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

The key allows APT to verify packages obtained from Docker's repository.


🗂️ Step 4: Add the Docker APT Repository

Next, configure Ubuntu to use Docker's official package repository:

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
  https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

This command dynamically detects:

  • Your CPU architecture
  • Your Ubuntu release codename
  • Docker's stable repository

The repository configuration is written to:

/etc/apt/sources.list.d/docker.list

🔄 Step 5: Update the Package Index

How to Disable Sleep When You Close the Laptop Lid in Ubuntu

Have you ever connected your Ubuntu laptop to an external monitor, SSH session, server, or other device and discovered that everything stops working as soon as you close the laptop lid?

By default, Ubuntu may suspend the system when the laptop lid is closed. This is useful for normal laptop use because it saves battery and reduces power consumption. However, it can be inconvenient when you want your laptop to continue running with the lid closed.

For example, you may want to use your Ubuntu laptop as:

  • A home server
  • An SSH server
  • A development machine
  • A media server
  • A Docker/Kubernetes node
  • A machine connected to an external monitor
  • A remote desktop system
  • A background download or automation system

Fortunately, Ubuntu allows you to change the lid-close behavior through systemd-logind.


What Happens When You Close the Laptop Lid?

On a typical Ubuntu installation, closing the lid triggers an action handled by systemd-logind.

The default behavior is commonly:

HandleLidSwitch=suspend

This means:

When the laptop lid is closed, suspend the system.

We can change this behavior to:

HandleLidSwitch=ignore

This tells Ubuntu:

When the lid is closed, do nothing.

The laptop will therefore continue running even though the physical lid is closed.


Method: Disable Suspend on Lid Close

Step 1: Open the Terminal

Press:

Ctrl + Alt + T

Alternatively, search for Terminal from the Ubuntu application menu.


Step 2: Open the systemd Login Configuration

Run:

sudo nano /etc/systemd/logind.conf

You will be asked for your administrator password.

The file contains configuration options controlling various login and power-management behaviors.


Step 3: Find the Lid Switch Setting

Look for:

#HandleLidSwitch=suspend

The # means that the line is commented out.

Change it to:

HandleLidSwitch=ignore

If the line already exists without #, simply change:

HandleLidSwitch=suspend

to:

HandleLidSwitch=ignore

Your configuration should look like:

[Login]
HandleLidSwitch=ignore

If [Login] already exists, don't create another [Login] section.


What About External Power?

Wednesday, September 9, 2026

Ubuntu 26.04 LTS: Setting Up Native RDP Remote Login from Windows — A Real-World Troubleshooting Guide

Table of Contents

  • Why use native GNOME RDP?
  • Remote Login vs Desktop Sharing
  • Check Ubuntu version
  • Enable system RDP
  • Configure TLS
  • Configure RDP credentials
  • Configure GDM
  • Check port 3389
  • Test from Windows
  • Diagnose RDP failures
  • Final architecture

Ubuntu 26.04 LTS and Native RDP

Ubuntu 26.04 LTS uses the modern GNOME desktop stack and provides GNOME Remote Desktop for remote desktop access.

This means you can connect to an Ubuntu machine from Windows using Microsoft's built-in Remote Desktop Connection application instead of immediately installing third-party RDP software.

Recommended approach: For a modern Ubuntu 26.04 workstation or headless AI server, start with GNOME's native Remote Login functionality before installing xrdp.

The Goal

┌──────────────────────────┐
│ Windows 11 PC            │
│                          │
│ mstsc.exe                │
└────────────┬─────────────┘
             │
             │ RDP / TCP 3389
             │
             ▼
┌──────────────────────────────┐
│ Ubuntu 26.04 LTS             │
│                              │
│ GNOME Remote Desktop         │
│             ↓                │
│ GDM / GNOME Login            │
│             ↓                │
│ Ubuntu Desktop               │
└──────────────────────────────┘

Remote Login vs Desktop Sharing

Tuesday, September 8, 2026

🚀 The Ultimate Guide to Running Local LLMs on Any PC

A Practical, Step-by-Step Guide to Running AI Models Locally


📖 Introduction

What Are Large Language Models (LLMs)?

Large Language Models are AI systems trained on vast amounts of text data to understand, generate, and manipulate human language. Think of them as incredibly advanced text prediction engines that can write essays, answer questions, write code, and even engage in creative writing.

Why Run LLMs Locally?

In recent years, cloud-based AI assistants like ChatGPT, Claude, and Gemini have become incredibly popular. However, running models on your own computer offers significant advantages:

BenefitDescription
🔒 Complete PrivacyYour data never leaves your machine – perfect for sensitive documents, medical information, or proprietary code
🌐 Offline AccessWork anywhere without internet connectivity – great for travel, remote locations, or secure environments
💰 No Subscription FeesOne-time setup, forever free – no monthly subscriptions or per-request charges
🎨 Full CustomizationYou control everything – model choice, system prompts, parameters, and fine-tuning
🚫 No Content FiltersUnrestricted access – useful for research, creative writing, and uncensored exploration
📈 Learning OpportunityUnderstand how AI works under the hood – invaluable for developers and AI enthusiasts

Who Is This Guide For?

This comprehensive guide is designed for:

  • 👨‍💻 Developers wanting to integrate AI into their applications without cloud costs

  • 🔬 Researchers who need complete control over their AI environment

  • ✍️ Writers and Creators seeking privacy for their work

  • 🎓 Students learning about machine learning and AI

  • 🏢 Businesses with data privacy requirements

  • 🤖 AI Enthusiasts wanting to explore state-of-the-art models


💻 System Requirements

Hardware Requirements

Before diving in, let's check if your hardware is ready. Here's what you need:

Minimum Requirements (Will Run Small Models)

ComponentSpecification
RAM8 GB
Storage20 GB free (SSD recommended)
CPU4+ cores, 2.0 GHz+
GPUOptional (CPU-only is fine for small models)
OSWindows 10+, macOS 12+, or Linux (Ubuntu 20.04+)

Recommended Requirements (Good Performance)

ComponentSpecification
RAM16 GB
Storage50 GB free (NVMe SSD recommended)
CPU8+ cores, 3.0 GHz+
GPUNVIDIA 6GB+ VRAM (RTX 3060/4060 minimum) or AMD with ROCm support
OSWindows 11, macOS 14+, or Linux (Ubuntu 22.04)

Optimal Requirements (Best Experience)

ComponentSpecification
RAM32-64 GB
Storage200+ GB free (NVMe SSD)
CPU12+ cores, 3.5 GHz+ (e.g., Ryzen 9, Intel i9)
GPUNVIDIA 12GB+ VRAM (RTX 3090/4090) or equivalent
OSWindows 11 Pro, macOS 15+, or Linux (Ubuntu 22.04+)

How to Check Your System

Windows:

powershell
# Check RAM and CPU
wmic memorychip get capacity
wmic cpu get name,numberofcores

# Check GPU
wmic path win32_VideoController get name,adapterram

# Check Storage
wmic logicaldisk get size,freespace,caption

macOS:

bash
# System info
system_profiler SPHardwareDataType

# GPU info
system_profiler SPDisplaysDataType

# Storage info
df -h

Linux:

bash
# CPU and RAM
lscpu
free -h

# GPU (NVIDIA)
nvidia-smi

# GPU (AMD)
rocm-smi

# Storage
df -h

🛠️ Preparation

Installing Python and Package Managers

Python is essential for most LLM tools. Here's how to set it up:

Windows

powershell
# Download Python from python.org
# Or use winget (Package Manager)
winget install Python.Python.3.11

# Verify installation
python --version

macOS

bash
# Using Homebrew (recommended)
brew install python@3.11

# Or download from python.org

# Verify
python3 --version

Linux (Ubuntu/Debian)

bash
# Install Python
sudo apt update
sudo apt install python3.11 python3-pip python3-venv

# Verify
python3 --version

Setting Up Virtual Environments

Virtual environments isolate your Python packages – crucial for avoiding conflicts.

Create Virtual Environment

bash
# Create venv
python -m venv llm_env

# Activate on Windows
llm_env\Scripts\activate

# Activate on macOS/Linux
source llm_env/bin/activate

# Upgrade pip
pip install --upgrade pip

GPU Drivers and Dependencies

Featured Posts

How to Install Docker Engine on Ubuntu: Step-by-Step Guide

  Docker has become one of the most important tools in modern software development, DevOps, cloud engineering, and system administration. Wh...