Vol. I · No. 46The command line sectionSat, 10 Oct 2026
Configuration and changing data

/opt

self-contained add-on software

/opt is for software that keeps to itself. Instead of spreading its files across /usr, a program installed here keeps everything in one directory of its own. It is where commercial and third-party applications usually install.

One directory per product. Delete the directory, and it is gone.

Holds
Add-on software
One directory per product
On disk
Yes
Often empty on a fresh install
Who writes
root
Usually a vendor’s installer
Name
Optional
Not part of the base system

Why it exists

Every directory at the top of the tree is there for a reason. This is the problem /opt solves.

Keeps vendor software apart

A product that brings its own libraries would clash with the system’s if it were unpacked into /usr. In /opt it cannot.

Easy to remove

Everything the program owns is under one directory, so removing it does not mean hunting for files across the system.

What you find inside

Not everything, but the entries worth recognising. Each is marked as a directory, a file, a link or a device.

/opt
  • googledirectoryGoogle Chrome, when installed from Google’s package.
  • containerddirectoryFiles installed alongside Docker.
  • product/bindirectoryA bundle’s own programs — not on PATH unless it is added.
  • product/libdirectoryThe libraries the bundle brings with it.

At the terminal

Four commands that show what this directory is doing on a real machine.

ls /opt

List the add-on software installed on this machine.

du -sh /opt/*

Show how much space each product takes.

ls -l /opt/google/chrome

Look inside one bundle to see its own programs and libraries.

export PATH="$PATH:/opt/product/bin"

Add a bundle’s programs to the directories the shell searches.

Handle with care

What goes wrong here, and what someone securing or attacking the machine looks at.

It may not update itself

Software unpacked into /opt by hand is not known to the package manager, so system updates skip it. Keeping it patched is your job.

Check who owns it

A program in /opt that any user can modify, but which root runs, is a route to becoming root. The files should belong to root.

Read alongside