このコンテンツは選択した言語では利用できません。

2.4. Interacting with the CLI


The CLI is an interactive shell for controlling your Red Hat Storage Console from the command line. Type the required command and any additional parameters.

Example 2.1. Entering a shell command

[RHSC shell (connected)]# show cluster --name desktop_clusters
Copy to Clipboard Toggle word wrap
To support the construction of command and parameter combinations, the CLI includes the functionality to list and automatically complete commands and parameters by pressing the TAB key twice, similar to the bash shell.

Example 2.2. Listing and automatic completion of commands and parameters

Press TAB twice at a blank prompt to list all available commands.
[RHSC shell (connected)]# TAB TAB
EOF       connect       exit       info       shell
action    console       file       list       show
add       disconnect    help       ping       status
clear     echo          history    remove     update
Copy to Clipboard Toggle word wrap
Choose a command and press TAB twice to view the next set of available parameters for the command. For the show command, this lists all resources.
show TAB TAB
brick      glustervolume      network      role
cluster    group              nic          statistic
domain     hook               permission   tag
event      host               permit       user
Copy to Clipboard Toggle word wrap
Pressing TAB twice also completes commands and parameters.
[RHSC shell (connected)]# show cluster TAB TAB
id         name           
[RHSC shell (connected)]# show cluster naTAB TAB
[RHSC shell (connected)]# show cluster --name
Copy to Clipboard Toggle word wrap
Note that pressing TAB twice also automatically formats na to the --name parameter, including the prefix. If the incomplete parameter matches multiple parameters, pressing TAB twice lists all those parameters.
The CLI provides functions for running Linux commands using either the shell command or the bang (!) character.

Example 2.3. Running Linux shell commands

Use the shell command:
[RHSC shell (connected)]# shell ls -la
Copy to Clipboard Toggle word wrap
Or use the bang (!) character:
[RHSC shell (connected)]# !ls -la
Copy to Clipboard Toggle word wrap
Similar to the Linux shell, the CLI can pipe data to other commands and sources.

Example 2.4. Piping CLI commands

Pipe CLI data to a Linux shell command:
[RHSC shell (connected)]# list clusters --show-all | grep "Example"
name                      : Example1
name                      : Example2
name                      : ExampleEngineering
description               : An Example description
name                      : BestExampleCluster
Copy to Clipboard Toggle word wrap
Pipe CLI data to a file:
[RHSC shell (connected)]# list clusters --show-all > cluster_List.txt
Copy to Clipboard Toggle word wrap
The CLI also contains an online help system to provide descriptions and syntax for each command via the help command.

Example 2.5. Using online help for the show command

[RHSC shell (connected)]# help show
Copy to Clipboard Toggle word wrap
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat