Use it to locate third-party software, or when a program in /opt is not on PATH.
/opt
/opt is for add-on software packages that install into their own directory (/opt/<vendor>/<app>), often from vendors outside the distribution.
1. ls -ld /opt and findmnt /opt — present and mounted where expected?
2. df -h /opt — space left? df -i /opt — inodes left?
3. Find large or unexpected content: du -xh --max-depth=1 /opt | sort -h | tail.
4. Permissions and owner as the FHS and services expect?
5. Fix space, permissions or mount, then retest the service.
/opt mounted (or virtual) → correct owner and permissions → enough space → services read and write as intended
For Filesystem → /opt, continue with the first unproven Topic check: Identify package/vendor ownership and exact software version beneath /opt. If that boundary is healthy, advance to the adjacent check: Trace linked configuration, state, service units, PATH/library integration and external dependencies. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
vendor/package artifact → /opt installation tree → external config/state integration → service/PATH/runtime dependencies → process launch → application behavior
Healthy evidence: software ownership/version, external integration paths and runtime dependencies are known and the intended application starts and passes its workload check.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Identify package/vendor ownership and exact software version beneath /opt.
- Trace linked configuration, state, service units, PATH/library integration and external dependencies.
- Verify executable architecture, interpreter/runtime and effective launch context.
- Test the actual application workload rather than stopping at directory or binary presence.
Verification chain. vendor/package artifact → /opt installation tree → external config/state integration → service/PATH/runtime dependencies → process launch → application behavior
Step 3 Commands Verify boundary
ls /opt
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: all application state is assumed under /opt, a copied tree is treated as a complete install, or deletion under /opt leaves service/config/state artifacts behind.
/opt shows add-on file placement, not registration, runtime dependencies, service activation or application health.
Step 5 Common mistakes Narrow the fault
- Software in
/optwithout updates or ownership.
Step 6 Where it fails Narrow the fault
Walk hardware/block device → kernel driver/mapper/RAID/LVM → filesystem → mount namespace/options → path permissions/MAC → consumer I/O and stop where observed state diverges.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Programs in /opt are usually not on PATH — add their bin directory or link into /usr/local/bin. They are not updated by apt/dnf unless the vendor provides a repository.
ls -ld <path>— owner, permissions and typestat <path>— inode, links, size and timestampsdf -h <path>— filesystem and free spacefindmnt <path>— which mount the path is on
ReferenceWhat it is1 section · depth on demand
Core model
Identify package/vendor ownership, installation root, configuration/state locations and launch integration. Do not assume all application configuration/log/data stays under /opt; many products use /etc/opt, /var/opt, systemd units or other integration paths.
ReferenceWhy it matters1 section · depth on demand
Overview
/opt is for self-contained add-on software that does not follow the FHS split (/opt/vendor/app/{bin,lib,etc}), typically from vendor installers. Config may live in /etc/opt/<app> and variable data in /var/opt/<app>.
Because /opt applications are outside the package manager's view, track them separately (version, updates, removal), and check SELinux contexts — files under /opt get generic labels that confined services may not be allowed to read.
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
/opt shows add-on file placement, not registration, runtime dependencies, service activation or application health.
In depth
/opt: self-contained add-on software
The hier(7) manual page describes /opt as the place for add-on packages that contain static files. Each such package gets its own directory, /opt/<package>, with its programs, libraries and documentation together. That's typical for commercial software, vendor agents and applications distributed as one tree rather than split across /usr.
Layout conventions
| Path | Purpose |
|---|---|
/opt/<package>/bin | The package's programs |
/opt/<package>/lib | Its libraries |
/etc/opt/<package> | Host-specific configuration |
/var/opt/<package> | Variable data (state, logs) |
/opt compared with /usr/local
/opt/<package> | /usr/local | |
|---|---|---|
| Structure | One directory per package | Shared bin, lib, share |
| Typical source | Vendor tarballs, commercial software, agents | make install from source |
| Removal | rm -rf /opt/<package> | Needs a list of the installed files |
| On PATH by default | No | Yes (/usr/local/bin) |
Making programs in /opt usable
| Method | Example |
|---|---|
Symlink into /usr/local/bin | ln -s /opt/tool/bin/tool /usr/local/bin/tool |
| PATH addition for all users | /etc/profile.d/tool.sh with PATH=$PATH:/opt/tool/bin |
| Libraries | /etc/ld.so.conf.d/tool.conf with /opt/tool/lib, then ldconfig |
| systemd unit | Full path in ExecStart= |
host$ ls /opt
containerd google splunkforwarder
host$ ls /opt/splunkforwarder/bin | head -3
host$ sudo ln -s /opt/splunkforwarder/bin/splunk /usr/local/bin/splunk
host$ echo 'export PATH="$PATH:/opt/tool/bin"' | sudo tee /etc/profile.d/tool.sh
host$ echo /opt/tool/lib | sudo tee /etc/ld.so.conf.d/tool.conf && sudo ldconfig
host$ ldconfig -p | grep -c /opt/tool/lib
host$ dpkg -S /opt/google 2>/dev/null || echo "not owned by a package"
Ownership and updates
Some software in /opt is installed through a package (.deb or .rpm), and some by unpacking an archive. dpkg -S or rpm -qf tells you which. Package-installed software updates with the system. Unpacked software needs its own update process, and its own entry in the inventory.
Documented example, not captured output.
How it works at runtime
/opt is part of Filesystem → /opt. /opt is an FHS location for add-on application software packages that are largely self-contained beneath /opt/<package-or-provider>, often used by third-party software outside the distribution’s normal /usr hierarchy.
Topic-specific state model. /opt is an FHS location for add-on application software packages that are largely self-contained beneath /opt/<package-or-provider>, often used by third-party software outside the distribution’s normal /usr hierarchy.
Interpretation rule. - Application installed under /opt ≠ all its configuration and mutable data also lives under /opt.
- Directory exists ≠ software is registered with systemd, PATH, libraries or package inventory.
- Vendor bundle present ≠ correct architecture/runtime dependencies are satisfied.
- Removing /opt content ≠ complete clean uninstall when integration files exist elsewhere.
Mechanics
Follow the path in order: hardware/block device → kernel driver/mapper/RAID/LVM → filesystem → mount namespace/options → path permissions/MAC → consumer I/O.
Limits and how it fails
Primary failure point. /opt shows add-on file placement, not registration, runtime dependencies, service activation or application health.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. /opt owns add-on placement semantics. Package Management, systemd, /etc, /var and application-specific branches own lifecycle and runtime details.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Filesystem → /opt. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
/opt operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for /opt.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | /opt is an FHS location for add-on application software packages that are largely self-contained beneath /opt/<package-or-provider>, often used by third-party software outside the distribution’s normal /usr hierarchy. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin process/container mount namespace → resolve the exact path from / and record every mount crossing → identify final dentry + filesystem/device + inode + file type → capture ownership/mode/ACL and capacity where relevant → map pseudo/device/runtime objects to the live kernel/process endpoint → verify the original consumer read/write/execute/service result. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | vendor/package artifact → /opt installation tree → external config/state integration → service/PATH/runtime dependencies → process launch → application behavior | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | /opt proves add-on file placement, not registration, runtime dependencies, service activation or application health. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated namespace, path and object evidence can establish this Linux Filesystem proof path: vendor/package artifact → /opt installation tree → external config/state integration → service/PATH/runtime dependencies → process launch → application behavior | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured namespace, mount, inode/object, authorization, backing-resource or consumer scope. /opt proves add-on file placement, not registration, runtime dependencies, service activation or application health. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven boundary: preserve the same process mount namespace, resolve the path and mount crossings, identify the exact object/inode or live pseudo/device endpoint, inspect effective access/capacity, then repeat the original consumer operation before changing unrelated filesystem state. | Continue to the next unresolved boundary while preserving the original test condition. |
/opt · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | /opt |
|---|---|
| Topic path | Filesystem → /opt |
| Runtime state | /opt is an FHS location for add-on application software packages that are largely self-contained beneath /opt/<package-or-provider>, often used by third-party software outside the distribution’s normal /usr hierarchy. |
| Fast checks | - Identify package/vendor ownership and exact software version beneath /opt. - Trace linked configuration, state, service units, PATH/library integration and external dependencies. - Verify executable architecture, interpreter/runtime and effective launch context. - Test the actual application workload rather than stopping at directory or binary presence. |
| Verification chain | vendor/package artifact → /opt installation tree → external config/state integration → service/PATH/runtime dependencies → process launch → application behavior Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary. |
| Failure boundary | /opt proves add-on file placement, not registration, runtime dependencies, service activation or application health. Boundary chain: process credentials/namespace → path/mount lookup → DAC/ACL/LSM → filesystem metadata → block/device/backend → completion/read-back. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |