0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Red Hat Enterprise Linux コマンド

Last updated at Posted at 2021-10-24

あいさつ

やっと勉強する時間が確保できた、知識が線ではなく点な状態のインフラ民けいしーです。(´・ω・`)

わざわざ記事に必要あるのか、正直微妙なところですが、ある種のノート代わりとして使おうかなと思ったところですね。

コマンド一覧

1. ネットワーク設定関連

IPアドレスの確認

ifconfig

インターフェースの接続

nmcli con up ens160

# 接続が正常にアクティベートされました (D-Bus アクティブパス: /org/freedesktop/NetworkManager/ActiveConnection/3)

インターフェースの接続-2.

ifconfig <interface-name> up

インターフェース設定

ifconfig <interface-name> <ipv4-address> netmask <subnet-mask> 

インターフェースの切断

nmcli con down ens160

# 接続 'ens160' が正常に非アクティブ化されました (D-Bus アクティブパス: /org/freedesktop/NetworkManager/ActiveConnection/3)

疎通確認

ping www.google.co.jp

# 疎通ができている場合
# PING www.google.co.jp (xxx.xxx.xxx.xxx) 56(84) bytes of data.
# 64 bytes from xxx.xxx.xxx (xxx.xxx.xxx.xxx): icmp_seq=1 ttl=128 time=38.9 ms
# 
# 疎通ができていない場合
# 
# ping: www.google.co.jp: 名前またはサービスが不明です

2. サブスク関連

サブスクリプション情報の確認

subscription-manager identity

# 登録されていない場合
# このシステムは登録されていません。 詳細については「subscription-manager register --help」をご覧ください。

サブスクリプション(オフライン)の登録

以下参照(/・ω・)/

サブスクリプション(オンライン)の登録

subscription-manager register --username <UserName> --password <Password> --consumerid=<プロファイルのUUID>

# 登録中: subscription.rhsm.redhat.com:443/subscription
# このシステムは、次の ID で登録されました: <プロファイルのUUID>
# 登録したシステム名: testrhel

2-4. Red Hat 公式サイトからのサブスク状況の確認

スクリーンショット 2021-10-25 024719.png

2-5. CUI上でサブスク状況の確認①

subscription-manager status

# +-------------------------------------------+
#    システムのステータス詳細
# +-------------------------------------------+
# 全体のステータス: 最新
# 
# システムの目的の状態: 指定されていません

CUI上でサブスク状況の確認②

subscription-manager list

# +-------------------------------------------+
#     インストール済み製品のステータス
# +-------------------------------------------+
# 製品名:           Red Hat Enterprise Linux for x86_64
# 製品 ID:          479
# バージョン:       8.4
# アーキテクチャー: x86_64
# 状態:             サブスクライブなし
# 状態の詳細:       
# 開始:             
# 終了:             

利用可能なサブスクリプションの確認

出力結果が長いので省略

subscription-manager list --available

3. その他

RHELバージョンの確認

cat /etc/redhat-release

# Red Hat Enterprise Linux release 8.4 (Ootpa)

アカウント関連

Rootユーザにログイン

su -
# パスワード:<パスワードを入力(非表示)>

ホスト名の確認

hostname

ユーザーアカウントの詳細の表示①

cat /etc/passwd

ユーザーアカウントの詳細の表示②

id

ユーザーグループの作成

groupadd <NAME>

ユーザーグループの確認

cat /etc/group

ショートカットキー 一覧

1. コピー&ペースト

コピー

Ctrl + Shift + C

ペースト

Ctrl + Shift + V

おわりに

勉強するたびに随時更新予定です。(´・ω・`)

関連資料

・Red Hat Enterprise Linux 公式

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?