Chapter 4. Using the command-line assistant powered by RHEL Lightspeed on RHEL systems


The command-line assistant powered by RHEL Lightspeed is designed to assist both less experienced and experienced users to interact with RHEL by using the command-line interface. The command-line assistant can help you with tasks such as: answering RHEL related questions, assisting with troubleshooting, assisting with deciphering log entries, and many other tasks.

Warning

Do not rely on the results from AI tools without human review. Always check the AI and LLM-generated responses for accuracy before using the generated suggestions.

4.1. Asking questions to the command-line assistant

To use the command-line assistant powered by RHEL Lightspeed, use the “c” command followed by your questions in quotation marks. For example:

  • Ask a question by using the following syntax: c + “question”. For example:

    $ c "What is RHEL"
    Copy to Clipboard
Warning

Do not enter the following types of data when using the command-line assistant, because the assistant is not intended to process data such as:

  • Personal information
  • Business sensitive information
  • Confidential information
  • System data information

The following are examples of prompts that you can use to interact with the command-line assistant when using your RHEL systems:

Request information on how to troubleshooting a problem:

$ c "how to troubleshoot sshd failing to start"
Copy to Clipboard
$ c "how do I find all the files in the /etc that have been modified in the last hour"
Copy to Clipboard

4.2. Attaching a file to your questions to the command-line assistant

You can attach a file to the command-line assistant powered by RHEL Lightspeed. By doing so, the assistant can provide a tailored response based on that file.

For example, if you want to replicate the volume group, logical volumes, and file systems on another system, you can create a file with the storage information, and run the command-line assistant to get information about the required steps to replicate that specific storage partition in another system. For example:

$ c --attachment <storage_info>
Copy to Clipboard

Optionally, use the short version of the attachment command. For example:

$ c -a <storage_info>
Copy to Clipboard

You can also combine the attachment with a question:

$ c --attachment <storage_info> "how can I replicate the storage configuration in another system"
Copy to Clipboard

4.3. Checking your history interaction with the command-line assistant

Access your conversation history with the command-line assistant powered by RHEL Lightspeed.

  • Fetch all user history. For example:

    $ c history --all
    Copy to Clipboard
  • Access the first conversation from history. For example:

    $ c history --first
    Copy to Clipboard
  • Access the last conversation from history. For example:

    $ c history --last
    Copy to Clipboard
  • Filter your history conversation to search for a term to retrieve all questions and answers related to that word. For example:

    $ c history --filter “podman”
    Copy to Clipboard
  • Clear all the user history:

    $ c history --clear
    Copy to Clipboard

4.4. Redirecting a command output to the command-line assistant

Use the log file that contains information that you want to understand by redirecting that log file output to command-line assistant powered by RHEL Lightspeed.

$ cat <log_file.log> | c
Copy to Clipboard

If the error or log that you have provided to the command-line assistant does not provide enough information, you can combine the redirect output with a question, for example:

$ cat <log_file_error.log> | c "how do I solve this?"
Copy to Clipboard

You can also redirect a question:

$ echo "how do I solve this?" | c -a <log_file_error.log>"
Copy to Clipboard

4.5. Enabling the command-line assistant to capture your terminal activity

The command-line assistant powered by RHEL Lightspeed has an optional feature that enables you to reference commands that you previously ran.

Warning

If you add terminal context in a request and there are no previously captured commands, the command will fail. You can only add context from the terminal while the capture mode is enabled.

  1. Enable the terminal capture for your current terminal session. For example:

    $ c shell --enable-capture
    Copy to Clipboard
  2. Run at least one command before you reference previous commands.

    After you enable the capture, you can reference the previous output of a command that you ran. For example, to reference the last command, run:

    $ c -w 1 "what_is_this"
    Copy to Clipboard

    To reference the second to last command, run:

    $ c -w 2 "what_is_this"
    Copy to Clipboard
  3. To stop terminal capture, press the following keys on your keyboard:

    $ Press Ctrl + D
    Copy to Clipboard

4.6. Submitting feedback about the command-line assistant responses

You can submit feedback about the responses that you receive when you interact with the command-line assistant powered by RHEL Lightspeed:

$ c feedback
Copy to Clipboard
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat