Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Introducing Toolbx

July 16, 2024
Debarshi Ray Sumantro Mukherjee
Related topics:
ContainersDeveloper productivityDeveloper toolsIDEsLinux
Related products:
Red Hat Enterprise LinuxRHEL UBI

    Red Hat Enterprise Linux (RHEL) offers a development and troubleshooting tool called Toolbx. It was first added to RHEL as a technical preview, but was later blessed as production ready in versions 8.8 and 9.2. This article provides a high level introduction to Toolbx, describing how it supports modern development and troubleshooting workflows with pointers to some lower level details.

    What is Toolbx?

    Toolbx is a tool for Linux, which allows the use of interactive command line environments for software development and troubleshooting the host operating system, without having to install software on the host. It is built on top of Podman and other standard container technologies from Open Container Initiative (OCI).

    Every additional piece of software that’s installed on a production machine can disturb the deployment environments for the workloads and make them vulnerable to bugs in the software. For example, RPM packages can run arbitrary scripts during installation, upgrades and removal that can alter the host in unexpected ways that are hard to debug.

    Toolbx solves this problem by providing a fully mutable container within which one can install their favorite development and troubleshooting tools, editors, and SDKs. For example, it’s possible to do yum install ansible without affecting the base operating system.

    Sometimes, software developers and system administrators want to try out different operating system distributions and versions. This could be either because a software project or troubleshooting tool requires a specific version of a specific distribution, or because one wants to check how a certain piece of software behaves on a different distribution and version.

    Virtual machines (VMs) used to be the usual solution for these situations, but VMs can be resource intensive and slow to set up. Toolbx offers a cheaper and quicker alternative as long as one doesn't need to use a different kernel than the host operating system.

    The Toolbx environment is based on an OCI image. On Red Hat Enterprise Linux it defaults to the toolbox image from registry.access.redhat.com. This image is used to create a Toolbx container that offers the interactive command line environment.

    Getting started

    Toolbx can be used by installing the toolbox package with DNF in the usual way. One can then create a Toolbx container:

    [rishi@rhel ~]$ toolbox create
    Image required to create toolbox container.
    Download registry.access.redhat.com/ubi9/toolbox:latest (288.6MB)? [y/N]: y
    Created container: rhel-toolbox-latest
    Enter with: toolbox enter
    [rishi@rhel ~]$

    On a Red Hat Enterprise Linux host, this will create a container called rhel-toolbox-latest. On a Fedora 40 host, it will create one called fedora-toolbox-40, and so on.

    The Toolbx container can be used by entering it:

    [rishi@rhel ~]$ toolbox enter
    ⬢[rishi@toolbox ~]$

    It presents an interactive command line environment which should look and feel just like the one on the host operating system, other than the hexagon in front of the prompt.

    Once a Toolbx container is no longer needed, it can be removed:

    [rishi@rhel ~]$ toolbox rm rhel-toolbox-latest
    [rishi@rhel ~]$

    Common use cases

    Toolbx isn’t your average constrained container tool. It really shines as an interactive command line environment that can be used just like the usual Linux CLI on the host operating system that most people are familiar with. Toolbx environments have seamless access to the user’s home directory, the Wayland and X11 sockets, networking (including Avahi), removable devices (like USB sticks), systemd journal, SSH agent, D-Bus, ulimits, /dev and the udev database, and more.

    The toolbox enter command is designed to be used both standalone and as the default shell in a terminal emulation application, if so desired.

    Development

    One of the primary goals of Toolbx is to help with software development, and it tries to cater to a wide range of use cases.

    Toolbx is perfect for hacking on command line tools like compilers and debuggers like GCC and GDB, container tools like Flatpak and Podman, and libraries like GStreamer and GTK.

    The development environment can be set up inside the container in the same way as on the host operating system. The project environment will no longer clash with the host OS, nor will it be limited to a single OS version. Testing against a different OS' user space is only a matter of creating a different Toolbx container.

    Toolbx really shines on the desktop. The same principles mentioned above apply when building desktop applications, both when using classical development environments with Emacs and Vim, or graphical integrated development environments.

    Builder, the integrated development environment for GNOME, has integrated Toolbx in a way that allows developing and testing desktop applications literally at the push of a button. The application is built, run, and tested against the development tools and software development kits installed inside a specific Toolbx container. See Figure 1.

    A view of the GNOME Builder on a RHEL host.
    Figure 1: Using GNOME Builder on a RHEL host to build, run and test a desktop application against a Toolbx container.

    Toolbx environments can be used to develop web applications too. It's used to create its own website, and it’s the recommended way to make changes to it.

    Toolbx also supports developing operating system components like GNOME Shell and Pipewire.

    Developing GNOME Shell used to be quite cumbersome, and satisfying the dependencies was a chore. The Shell developers have streamlined their workflow using Toolbx considerably. Builder allows running GNOME Shell in nested mode as if it was an application, considerably streamlining the development and testing workflow.

    Developing operating system components can require running a full Wayland session with systemd-logind and udev. It’s possible to do that from inside a Toolbx container.

    Below we detail how a full GNOME session can be run from inside a Toolbx container on a Red Hat Enterprise Linux host.

     

    Note:

    This example requires a version of Mutter that supports the XDG_SESSION_ID environment variable, which is not the case in Red Hat Enterprise Linux 9.4. This shouldn't be a problem for developers because they would be compiling from source code, and not restricted to the official RHEL binaries. To keep this example short and simple, a Fedora 40 Toolbx container created with toolbox create --distro fedora --release 40 is used.

    Use ctrl+alt+f<n> to switch to a Linux console and log in. Then:

    [rishi@rhel ~]$ export XDG_CURRENT_DESKTOP=GNOME
    [rishi@rhel ~]$ toolbox enter fedora-toolbox-40
    ⬢[rishi@toolbox ~]$ sudo dnf install flatpak gnome-backgrounds gnome-shell
    ⬢[rishi@toolbox ~]$ dbus-run-session gnome-shell --wayland

    This will bring up a full GNOME session running from inside the Toolbx container on the RHEL host. See Figure 2.

    Running a full GNOME session from inside a Toolbx container on a RHEL host
    Figure 2: Running a full GNOME session from inside a Toolbx container on a RHEL host.

    Note that GNOME picks up the device name from the RHEL host operating system, even though it's a Fedora container.

    Troubleshooting

    Another important goal of Toolbx is to help troubleshoot the host operating system or network without installing any extra tools on the host. It’s possible to use the toolbox(1) command as root on the host OS to create environments for performing privileged operations on the host.

    Toolbx is perfect for using Nmap to scan IP addresses and ports in a network, including TCP SYN scans with the -sS option that requires root access to the host operating system:

    [root@rhel ~]# toolbox enter
    ⬢[root@toolbox ~]# nmap -sS scanme.nmap.org
    Starting Nmap 7.93 ( https://nmap.org ) at 2024-03-04 17:09 CET
    Nmap scan report for scanme.nmap.org (45.33.32.156)
    Host is up (0.22s latency).
    Other addresses for scanme.nmap.org (not scanned): 2600:3c01::f03c:91ff:fe18:bb2f
    Not shown: 992 closed tcp ports (reset)
    PORT      STATE    SERVICE
    22/tcp    open     ssh
    80/tcp    open     http
    135/tcp   filtered msrpc
    139/tcp   filtered netbios-ssn
    179/tcp   filtered bgp
    445/tcp   filtered microsoft-ds
    9929/tcp  open     nping-echo
    31337/tcp open     Elite
    Nmap done: 1 IP address (1 host up) scanned in 6.03 seconds
    ⬢[root@toolbox ~]#

    Similarly, Toolbx can be used to look at the logs for all processes running on the host with journalctl(1), including those with elevated privileges.

    Custom images

    It's possible to change the OCI image used to create the Toolbx environments. One option is to use the distro command line and configuration file options to select a different built-in image. The other is to create a custom Toolbx image from a Containerfile or an existing Toolbx container.

    The Toolbx documentation covers the topic of custom images in great detail.

    Further reading

    Learn more about Toolbx in the documentation. It comes with an exhaustive manual complete with examples that covers each command and the configuration file. The Toolbx website contains a rich assortment of interesting information that's worth going through for both newcomers and seasoned practitioners alike.

    Related Posts

    • How to use Go Toolset container images

    • Build lightweight and secure container images using RHEL UBI

    • Containerize .NET for Red Hat OpenShift: Linux containers and .NET Core

    • Using Delve to debug Go programs on Red Hat Enterprise Linux

    Recent Posts

    • Testing infrastructure red teaming with abliterated models

    • Build an enterprise RAG system with OGX

    • Solutions for SELinux MCS challenges with GitLab runners

    • MCP servers vs. skills: Choosing the right context for your AI

    • How to route external and local LLMs with Models-as-a-Service

    What’s up next?

    This Learning Paths will walk you through a simple Red Hat SSO extension installation on Podman Desktop. After adding the Red Hat SSO extension, log-in to your SSO account and access the Red Hat Registry (catalog.redhat.com ) to access the image mode for RHEL image.

    Start the activity
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.