Git

Install and Use lazygit on Linux and macOS (Git Terminal UI)

Half the Git commands you type in a day are bookkeeping: status, add, diff, branch, checkout, stash. lazygit collapses that loop into a single terminal window where files, branches, commits, and stashes each get a panel, and one keypress does what a full command used to. Interactive rebases stop being scary, partial staging works line by line, and merge conflicts become hunk picking instead of marker surgery. Everything in this guide on how to install lazygit and drive it was run in August 2026 on Ubuntu 26.04 and 24.04, with Debian 13, Fedora 44, and Arch checked in containers, against lazygit 0.64.1.

Original content from computingforgeeks.com - post 3280

The install story changed recently and most guides have not caught up. Ubuntu finally ships lazygit in its own archive as of 26.04, the community PPA everyone links is dead, and Fedora’s popular COPR is ten releases behind. Which method you should use depends on your distro, so the sections below cover the binary route that always works, the apt path on Ubuntu and Debian, dnf and pacman, and Homebrew on macOS. The only prerequisite is Git itself plus any terminal emulator.

Install the Latest lazygit on Any Linux Distro

The prebuilt binary from GitHub releases is the one method that gives you the current release on every distro, the day it ships. Detect the latest version and install it in one block:

LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": *"v\K[^"]*')
echo "Installing lazygit ${LAZYGIT_VERSION}"
curl -sLo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
tar xf lazygit.tar.gz lazygit
sudo install lazygit -D -t /usr/local/bin/
rm -f lazygit lazygit.tar.gz

On ARM64 machines (Raspberry Pi, AWS Graviton, Ampere), swap x86_64 for arm64 in the download URL. The echo is there for a reason: the unauthenticated GitHub API allows 60 requests per hour per IP, so if it prints nothing you are rate limited and the download would 404. Confirm the install:

lazygit --version

The version line names the release and the build source:

commit=fbe2379fa5831b1ce1a8a836a604652ffc14844f, build date=2026-08-12T17:52:51Z, build source=binaryRelease, version=0.64.1, os=linux, arch=amd64, git version=2.53.0

Install lazygit on Ubuntu 26.04 or 24.04

Ubuntu 26.04 is the first LTS that carries lazygit in the universe repository, so a plain apt install works with no third-party repo:

sudo apt update
sudo apt install -y lazygit

Checking the candidate with apt policy lazygit on a clean 26.04 server shows what the archive gives you:

lazygit:
  Installed: (none)
  Candidate: 0.57.0+ds1-1
  Version table:
     0.57.0+ds1-1 500
        500 http://archive.ubuntu.com/ubuntu resolute/universe amd64 Packages

That archive build sits a few releases behind upstream, which is normal for a frozen LTS and fine for daily use. On Ubuntu 24.04 the same check returns no candidate at all. The package never existed in noble, so on 24.04 you use the binary method from the previous section. It drops the current release into /usr/local/bin, which also means you can run it on 26.04 alongside the apt package: /usr/local/bin wins in PATH, and type -a lazygit shows both.

Error: “does not have a Release file” from the lazygit PPA

Older tutorials tell you to add ppa:lazygit-team/release. That PPA stopped publishing at lazygit 0.27.4 for Ubuntu 21.04, so on any current release apt update fails right after you add it:

E: The repository 'https://ppa.launchpadcontent.net/lazygit-team/release/ubuntu resolute Release' does not have a Release file.

The fix is to remove the dead entry and use the archive package or the binary instead:

sudo add-apt-repository -r -y ppa:lazygit-team/release
sudo apt update

lazygit Packages on Debian, Fedora, and Arch Linux

Debian 13 ships lazygit in main, so apt works the same way as on Ubuntu 26.04:

sudo apt update
sudo apt install -y lazygit

Fedora is the surprise: there is no lazygit package in the official Fedora 44 repos. The widely recommended atim/lazygit COPR still exists, but its last successful build is 0.47.2 and newer builds are failing, so it installs a version from two Fedora releases ago:

sudo dnf copr enable atim/lazygit -y
sudo dnf install -y lazygit
lazygit --version

The version it prints tells the story:

commit=, build date=, build source=unknown, version=0.47.2, os=linux, arch=amd64, git version=

On Fedora, skip the COPR and use the binary method. Arch is the opposite extreme: the extra repository repackaged the new release the same day upstream tagged it, so pacman is all you need:

sudo pacman -S lazygit

Here is where every distro stood when tested in August 2026, against the current upstream release:

DistroSourceVersion installedVerdict
Ubuntu 26.04universe repo0.57.0apt works, slightly behind
Ubuntu 24.04no packagen/ause the binary
Debian 13main repo0.50.0apt works, older
Fedora 44no official package; COPR stale0.47.2 via COPRuse the binary
Archextra repo0.64.1pacman, current
Any distroGitHub binary0.64.1always current

Install lazygit on macOS

Homebrew bottles the current release, so macOS is one command:

brew install lazygit

If you pin your formulas, note that Homebrew auto-updates on install by default, so this may pull other upgrades along. One macOS difference that catches Linux users: the config file lives at ~/Library/Application Support/lazygit/config.yml, not under ~/.config like on Linux.

First Run: Panels and Navigation

Move into any Git repository and start it:

cd ~/inventory-api
lazygit

The left column stacks five panels: Status, Files, Branches, Commits, and Stash. The main pane on the right shows the diff or log for whatever is selected:

lazygit terminal UI panels showing files branches commits and stash on Ubuntu

Jump straight to a panel with its number key (1 through 5) or cycle with Tab. Inside a panel, arrow keys or h/j/k/l move around, Enter drills in, and Esc backs out. Press ? at any point to see every keybinding that works in the panel you are in, which is the fastest way to learn the tool:

lazygit keybindings menu for the commits panel on Ubuntu

Keybindings and colors are customizable through ~/.config/lazygit/config.yml on Linux. The file does not exist until you create it, and the Config.md reference documents every key.

The Workflows That Replace Typed Git Commands

Stage and commit. In the Files panel, Space toggles staging on a file, a toggles everything at once, and Enter opens the file so you can stage individual hunks or lines. Press c, type the message, hit Enter, and the commit lands:

lazygit commit summary popup committing staged changes on Ubuntu

Push and pull. P pushes the current branch, p pulls. If no upstream is configured, lazygit prompts you to set one instead of failing the way raw git push does. f in the Files panel fetches without merging.

Branches. In the Branches panel, n creates a branch, Space checks out the selected one, and - flips back to the previous branch. r rebases your checked-out branch onto the selection, M merges the selection into it, and d opens delete options for local and remote.

Interactive rebase without the todo file. In the Commits panel, s squashes the selected commit into the one below, f fixes it up (same thing, message discarded), r rewords, d drops, and e starts an interactive rebase from that commit. Move a commit up or down the history with Ctrl+k and Ctrl+j. This is the feature that sells lazygit to people who have been rearranging rebase todo lists in an editor for years.

Stash. s in the Files panel stashes all changes, and S opens the stash variants (staged only, unstaged only). In the Stash panel, Space applies the selected entry, g pops it, d drops it, and n turns a stash into a new branch.

Merge conflicts. When a merge or rebase conflicts, opening the file puts you in a hunk picker: left and right arrows move between conflicts, up and down between hunks, Space picks the highlighted hunk, b keeps both, and z undoes a resolution you regret. No conflict markers to hand-edit.

Undo. z in the main panels uses the reflog to reverse the last Git operation. It will not restore working-tree changes you discarded, but a bad rebase or an accidental reset comes back in one keypress.

Keyboard Shortcuts Worth Memorizing

These are the bindings from the tested release, verified against the official keybindings reference. Context matters: the same key can do different things in different panels.

KeyPanelAction
SpaceFiles / Branches / StashStage file / checkout branch / apply stash
cFilesCommit staged changes
AFilesAmend last commit
p / PglobalPull / push
nBranchesNew branch
s / fCommitsSquash / fixup into the commit below
rCommitsReword commit message
dCommits / Branches / StashDrop commit / delete branch / drop stash
eCommitsStart interactive rebase here
z / ZglobalUndo / redo via reflog
vlistsToggle range select
/listsSearch or filter the view
:globalRun a shell command
+ / _globalCycle screen modes (normal, half, fullscreen)
?globalKeybindings menu for the current panel
qglobalQuit

Two habits pay off fast: v for range select before a bulk squash, and : for the odd command lazygit has no binding for, so you never leave the UI. If you live in the terminal anyway, lazygit pairs well with the gh CLI for the GitHub side (lazygit itself can open a pull request with o from the Branches panel) and with Gitleaks as a pre-push secrets check. Self-hosting your remotes on Gitea or Forgejo changes nothing here, lazygit only cares about the Git protocol.

Keep lazygit Updated

How you update depends on how you installed. The apt and pacman packages ride normal system upgrades. The Homebrew formula updates with brew upgrade lazygit. A binary install has no package manager watching it, so re-run the detection block from the first section whenever you want the newest release; it overwrites /usr/local/bin/lazygit in place. Upstream tags a release roughly monthly, and the releases page carries the changelog. Whichever route you took, lazygit --version tells you exactly what build you are on, and after an update the keybinding to check first is ?, since new features land there before anyone documents them.

Keep reading

Essential macOS Keyboard Shortcuts Reference macos Essential macOS Keyboard Shortcuts Reference Fix “apt-key is deprecated. Manage keyring files in trusted.gpg.d instead” Debian Fix “apt-key is deprecated. Manage keyring files in trusted.gpg.d instead” Best Terminal Shell Prompts for Zsh, Bash and Fish Featured Best Terminal Shell Prompts for Zsh, Bash and Fish Build Ladybird Browser on Ubuntu, Fedora, and macOS macos Build Ladybird Browser on Ubuntu, Fedora, and macOS Install Dia Browser on macOS: AI-First Browsing Guide macos Install Dia Browser on macOS: AI-First Browsing Guide Using Emacs on Linux and macOS – emac Commands examples Featured Using Emacs on Linux and macOS – emac Commands examples

Leave a Comment

Press ESC to close