Introducing RHEL Lightspeed for RHEL Systems explains what RHEL Lightspeed is and how it can be helpful for RHEL administrators.
First and foremost: What is RHEL Lightspeed?
RHEL Lightspeed is a feature from Red Hat that uses Artificial Intelligence (AI) to help people manage and use Red Hat Enterprise Linux (RHEL) more easily.
Think of it as a built-in “AI assistant” for RHEL. It can:
- Help automate tasks faster.
- Explain commands or settings in plain language.
- Suggest the correct commands to solve a problem.
Basically, it makes RHEL easier to understand and manage, especially for people who aren’t Linux experts yet.
The command-line assistant powered by RHEL Lightspeed
The command-line assistant powered by RHEL Lightspeed is an optional AI tool available within the RHEL command-line interface. It includes information from the Red Hat Knowledge Centered Service (KCS) articles, RHEL documentation, and other Red Hat resources. It is possible to use the assistant to get help with the following tasks, for instance:
- Answering RHEL-related questions (How can I check the amount of free memory?).
- Assistance with troubleshooting and fixing issues (The httpd service is not starting. Could you help me identify the root cause of that?).
- Understanding log files (What does this part of the log mean?).
- Asking for recommendations.
We can use the command-line assistant powered by RHEL Lightspeed for interactive workflows to solve issues, implement new RHEL features, find information, and more. For example, we can run a command and then use the command-line assistant to help us understand the output and possible next steps. Alternatively, we can ask a question about an SSH error, receive suggestions, and then ask another question to continue diagnosing the problem.
Warning:
The command-line assistant is a generative AI tool. Therefore, while the output that it provides is generally beneficial, some of its suggestions might be incomplete or inaccurate. Always review AI-generated content prior to use!
Important:
The command-line assistant is initially supported as a connected experience only, although Red Hat is investigating ways to support disconnected on-premise offerings. Therefore, the command-line assistant currently requires internet access to function correctly!
Installing the Command-Line Assistant
To use the command-line assistant powered by RHEL Lightspeed, you must be running on RHEL 10.0 or RHEL 9.6 or later. Additionally, before using it, we need to register the system with RHEL (must be a subscribed system). We have written an article about how to register a RHEL system. Click here to read the article.
To install the command-line assistant:
dnf install command-line-assistant

The package provides the “c” command, which is the primary user interface for the command-line assistant. Example of usage:

As we can see in the above picture, we asked:
c chat "How can I get the amount of free memory?"
And the RHEL Lightspeed provided us with a solution!
Imagine that we need to create a system user, but we do not know the correct syntax for that. We can ask the RHEL Lightspeed to help us do that:
c chat "How can I create a system user?"

How can we check a specific service status? In this case, for instance, let’s ask about the sshd service:
c chat "How can I check the sshd service status?"

How can we check all installed packages on the local system?
c chat "How can I check all installed-packages on the local system?"

Using the Command-Line Assistant in Interactive Mode
For more complex scenarios, you might engage in a turn-based conversation. This approach can provide more context for the command-line assistant to use when answering your questions. In such cases, you can launch the assistant in interactive mode:
c chat --interactive

As we can see, we can ask something and wait for the RHEL Lightspeed feedback. For example:

To quit the interactive mode:

Redirecting a Command Output to the Command-Line Assistant
Context is vital in troubleshooting, and the command-line assistant becomes far more helpful when it has specific data to analyze. One of the most powerful features is the ability to pipe command output directly into the command-line assistant.
We can check, for instance, the recent logs for the SSHD daemon. As we can see in the following picture, there are some authentication errors:

If you are reviewing logs from the SSHD daemon and want help diagnosing recent errors, then you could run the following command:
journalctl -u sshd.service --since "1 hour ago" | \
c chat "What could be causing errors in these logs?"

The RHEL Lightspeed got the logs and explained what probably happened here. Also, it provided us with some ways to mitigate the issue 🙂
Analyzing File Content
There is a possibility to send a file content to the command-line assistant for analysis.
This functionality is particularly helpful when reviewing configuration files or long logs, for example:
tail -n 10 /var/log/messages | c chat "Check those lines and search for errors"

Another possibility is to specify the file using the flag --attachment or -a. For example:
c chat -a /var/log/boot.log "Why did the last boot take so long?"

Checking the Interaction History with the Command-Line Assistant
To view answers that the command-line assistant powered by RHEL Lightspeed provided you with previously, you can access your conversation history with the assistant.
To fetch all user history:
c history --all
Access the first conversation from history:
c history --first
Access the last conversation from history:
c history --last
Filter your history conversation to search for a term to retrieve all questions and answers related to that word (in this case, for instance, the word is “podman”):
c history --filter “podman”
To clear all the user history:
c history --clear
That’s it for now 🙂