Linux

How to Install Software from tar.gz Files on Ubuntu: Complete 2026 Guide

6 min read

Sometimes apt doesn’t have what you need. Maybe you want the latest Node.js version, specialized research software, or proprietary tools that only ship as compressed archives. Installing from tar.gz files means doing it yourself, but it’s straightforward once you know the steps.

What Are tar.gz Files?

A tar.gz file is a compressed archive with software files. These might be ready-to-run binaries or source code you need to compile. The .tar format bundles files together. The .gz part compresses them.

Unlike Windows .exe files or Ubuntu’s .deb packages, tar.gz files don’t install automatically. You extract the files and set things up yourself. More work, but more control.

Prerequisites

Before starting, ensure you have:

  • [ ] Ubuntu 20.04 or later with terminal access
  • [ ] sudo privileges for system-wide installations
  • [ ] Internet connection for downloading software and dependencies
  • [ ] Basic familiarity with file manager and text editor
  • [ ] At least 2GB free disk space for software and dependencies
RequirementCheck CommandExpected Output
Terminal accessecho $SHELL/bin/bash or similar
sudo privilegessudo whoamiroot
tar utilitywhich tar/bin/tar
System architectureuname -mx86_64 or aarch64

Step 1: Set Up Your Installation Environment

Create a dedicated directory for custom software. This keeps your home folder organized:

mkdir -p ~/custom-software
cd ~/custom-software

This directory stores all manually installed apps. Makes them easier to manage later.

Terminal showing creation of custom-software directory with successful mkdir commandTerminal showing creation of custom-software directory with successful mkdir command

Install build tools that many installations need:

sudo apt update
sudo apt install build-essential curl wget

The build-essential package includes compilers and development tools. You might not need all of it. But having it prevents “compiler not found” errors.

Step 2: Understanding File Types and Architecture

Check your system architecture first:

uname -m

Common outputs:

  • x86_64: Intel/AMD 64-bit processors (most common)
  • aarch64: ARM 64-bit processors (newer systems)

Download software that matches your architecture. Wrong choice means “cannot execute binary file” errors.

Terminal showing uname -m command output displaying system architectureTerminal showing uname -m command output displaying system architecture

Scenario 1: Installing Node.js Development Tool

Step 3: Download Node.js from Official Source

Node.js often releases new versions before Ubuntu updates its packages. To get Node.js 22.x:

Go to nodejs.org and find “Other Downloads”. Copy the “Linux Binaries (x64)” tar.gz link.

cd ~/custom-software
wget https://nodejs.org/dist/v22.0.0/node-v22.0.0-linux-x64.tar.gz
Terminal showing wget download of Node.js tar.gz file with download progressTerminal showing wget download of Node.js tar.gz file with download progress

Step 4: Extract and Install Node.js

Extract the archive:

tar -xzf node-v22.0.0-linux-x64.tar.gz

The flags mean:

  • -x: extract files
  • -z: handle gzip compression
  • -f: specify filename

This creates a node-v22.0.0-linux-x64 directory. Node.js comes pre-compiled, so no building needed.

Terminal showing tar extraction command with visible extracted directory listingTerminal showing tar extraction command with visible extracted directory listing

Step 5: Set Up PATH Environment Variables

Add Node.js to your PATH so you can use it anywhere:

echo 'export PATH="$HOME/custom-software/node-v22.0.0-linux-x64/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Test the installation:

node --version
npm --version

You should see version numbers. This confirms everything works.

Terminal showing successful node and npm version commands with version outputTerminal showing successful node and npm version commands with version output

Scenario 2: Installing ImageJ Scientific Software

Step 6: Download ImageJ for Scientific Computing

ImageJ is imaging software for research. Download from imagej.net:

cd ~/custom-software
wget https://downloads.imagej.net/fiji/latest/fiji-linux64.tar.gz

Step 7: Extract ImageJ and Handle Java Dependencies

Extract ImageJ:

tar -xzf fiji-linux64.tar.gz

ImageJ needs Java. Install it if missing:

sudo apt install openjdk-11-jdk

Test ImageJ:

cd Fiji.app
./ImageJ-linux64

If ImageJ opens, close it and move to desktop integration. Java apps have quirks, but ImageJ bundles most dependencies.

Terminal showing ImageJ startup command with application launchingTerminal showing ImageJ startup command with application launching

Step 8: Create Desktop Integration for ImageJ

Make ImageJ appear in your app menu instead of needing terminal launches:

nano ~/.local/share/applications/imagej.desktop

Add this content:

[Desktop Entry]
Name=ImageJ
Comment=Image Processing and Analysis
Exec=/home/yourusername/custom-software/Fiji.app/ImageJ-linux64
Icon=/home/yourusername/custom-software/Fiji.app/images/icon.png
Terminal=false
Type=Application
Categories=Science;Education;

Replace yourusername with your actual username. Save and update:

update-desktop-database ~/.local/share/applications/
Text editor showing ImageJ desktop file configuration with proper syntax highlightedText editor showing ImageJ desktop file configuration with proper syntax highlighted

Scenario 3: Installing Proprietary Business Software

Step 9: Handle Proprietary Application Installation

Business apps often come as tar.gz files. The process varies, but common steps include:

Download the software:

cd ~/custom-software
# Replace with actual download URL from vendor
wget https://vendor.com/software/business-app-v2.1.tar.gz

Extract and check contents:

tar -xzf business-app-v2.1.tar.gz
cd business-app-v2.1
ls -la

Look for setup instructions:

cat README.txt
cat INSTALL
Terminal showing directory listing of extracted proprietary software with README and install files visibleTerminal showing directory listing of extracted proprietary software with README and install files visible

Step 10: Run Installation Scripts

Many proprietary apps include setup scripts:

chmod +x install.sh
sudo ./install.sh

If no installer exists, copy files manually:

sudo cp -r bin/* /usr/local/bin/
sudo cp -r lib/* /usr/local/lib/

Create desktop integration like in Step 8. Manual copying shows you what goes where.

Essential Terminal Commands Explained

These commands help with any tar.gz installation:

CommandPurposeExample
tar -xzf file.tar.gzExtract compressed archivetar -xzf software.tar.gz
chmod +x filenameMake file executablechmod +x install.sh
which commandFind command locationwhich node
export PATH="$PATH:/new/path"Add directory to PATHexport PATH="$PATH:~/custom-software/bin"
ldd binaryCheck binary dependenciesldd ./application

Configuration and System Integration

Managing Environment Variables

For permanent PATH changes, edit ~/.bashrc:

nano ~/.bashrc

Add at the end:

# Custom software installations
export PATH="$HOME/custom-software/node-v22.0.0-linux-x64/bin:$PATH"
export PATH="$HOME/custom-software/myapp/bin:$PATH"
Text editor showing bashrc file with PATH export commands properly formattedText editor showing bashrc file with PATH export commands properly formatted

Creating Symbolic Links

For system-wide access without PATH changes:

sudo ln -s ~/custom-software/myapp/bin/myapp /usr/local/bin/myapp

This creates a link in /usr/local/bin, which is already in PATH. Sometimes cleaner than PATH changes.

Tips and Troubleshooting

Permission Denied Errors

Problem: Permission denied when running binaries

Solution: Make files executable:

chmod +x filename
# Or for entire directory:
chmod +x -R directory/

Command Not Found After Installation

Problem: Installed software not found

Solutions:

  • Check PATH: echo $PATH
  • Reload shell: source ~/.bashrc
  • Verify location: ls ~/custom-software/appname/bin/

This is the most common issue with manual installs.

Terminal showing PATH echo command and troubleshooting steps for command not found errorTerminal showing PATH echo command and troubleshooting steps for command not found error

Missing Dependencies

Problem: “error while loading shared libraries”

Solution: Install missing libraries:

# Check what's missing
ldd ./application
# Install common dependencies
sudo apt install libc6-dev libssl-dev

Application Doesn’t Appear in Menu

Problem: Desktop integration not working

Solutions:

  • Check desktop file: ls ~/.local/share/applications/
  • Fix permissions: chmod 644 ~/.local/share/applications/myapp.desktop
  • Update database: update-desktop-database ~/.local/share/applications/

Uninstalling tar.gz Software

No automatic uninstaller means manual cleanup:

  • Remove directory: rm -rf ~/custom-software/appname/
  • Remove PATH entries from ~/.bashrc
  • Remove desktop files: rm ~/.local/share/applications/appname.desktop
  • Remove links: sudo rm /usr/local/bin/appname

When to Use tar.gz vs Alternatives

Installation MethodBest ForProsCons
tar.gzLatest versions, specialized softwareFull control, bleeding edgeManual updates, dependency management
aptSystem packagesAutomatic updates, dependency handlingLimited to repository versions
SnapSandboxed applicationsEasy installation, automatic updatesLarger size, slower startup
FlatpakPortable applicationsNo installation requiredLimited system integration

Wrapping Up

Manual tar.gz installation fills gaps that package managers miss. It’s perfect for bleeding-edge tools, research software, or proprietary apps. Just track what you install manually as these won’t update or uninstall themselves.