Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 3. 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.

3.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 Toggle word wrap
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 Toggle word wrap
$ c “how do I find all the files in the /ect that have been modified in the last hour”
Copy to Clipboard Toggle word wrap

3.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 Toggle word wrap

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

# $ c -a <storage_info>
Copy to Clipboard Toggle word wrap

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 Toggle word wrap

3.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 Toggle word wrap
  • Access the first conversation from history. For example:

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

    $ c history --last
    Copy to Clipboard Toggle word wrap
  • 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 Toggle word wrap
  • Clear all the user history:

    $ c history --clear
    Copy to Clipboard Toggle word wrap

3.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 Toggle word wrap

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 Toggle word wrap

You can also redirect a question:

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

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 Toggle word wrap
  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 Toggle word wrap

    To reference the second to last command, run:

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

    $ Press Ctrl + D
    Copy to Clipboard Toggle word wrap

3.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 Toggle word wrap
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat