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
| Requirement | Check Command | Expected Output |
|---|---|---|
| Terminal access | echo $SHELL | /bin/bash or similar |
| sudo privileges | sudo whoami | root |
| tar utility | which tar | /bin/tar |
| System architecture | uname -m | x86_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.

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.

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

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.

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.

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.

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/

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

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:
| Command | Purpose | Example |
|---|---|---|
tar -xzf file.tar.gz | Extract compressed archive | tar -xzf software.tar.gz |
chmod +x filename | Make file executable | chmod +x install.sh |
which command | Find command location | which node |
export PATH="$PATH:/new/path" | Add directory to PATH | export PATH="$PATH:~/custom-software/bin" |
ldd binary | Check binary dependencies | ldd ./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"

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.

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 Method | Best For | Pros | Cons |
|---|---|---|---|
| tar.gz | Latest versions, specialized software | Full control, bleeding edge | Manual updates, dependency management |
| apt | System packages | Automatic updates, dependency handling | Limited to repository versions |
| Snap | Sandboxed applications | Easy installation, automatic updates | Larger size, slower startup |
| Flatpak | Portable applications | No installation required | Limited 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.
