Install Docker on Linux (Ubuntu & Debian Quick Start)

install docker linux - custom-dkinst-featured.png

install docker linux sits at poor average position in Search Console — readers want the shortest correct path on **Ubuntu/Debian** before Compose and stacks. Full multi-distro guide: Docker on AlmaLinux & Ubuntu.

Remove distro packages

Old docker.io or conflicting packages break the official repo.

bashubuntu
sudo apt remove -y docker docker-engine docker.io containerd runc 2>/dev/null; true
purge
old

Add Docker apt repo

Use Docker’s convenience script or manual keyring on Ubuntu/Debian.

bashinstall
curl -fsSL https://get.docker.com | sudo sh
repo
apt

Enable and test

Start daemon and run hello-world.

bashtest
sudo systemctl enable --now docker
docker run --rm hello-world
hello
test

Non-root access

Add your user to the docker group (log out/in).

WarningThe docker socket is root-equivalent — only trusted users belong in the group.
group
docker

Quick Reference

Related tutorials

Diagrams are original illustrations by Gnome IT Solutions. Tutorial text © Gnome IT Solutions.