
先頭の「$」や「#」はLinuxの状態を示す記号で、コマンドを実行する事を示します。

$ = 一般ユーザによる実行
# = 管理者権限（root）による実行

コマンドを入力する時は、先頭の記号を”除いて”入力します。

◆第3回「サーバの要塞化」◆

①root権限の取得
$ su -

②アップデートの方法
# dnf upgrade

③rootログインを禁止する
$ vi /etc/ssh/sshd_config

PermitRootLogin no

# systemctl restart sshd

④ファイアウォール
# firewall-cmd --state

# firewall-cmd --list-all

⑤SELinux
# getenforce

⑥chrony
# vi /etc/chrony.conf

# systemctl start chronyd

# systemctl status chronyd

# systemctl enable chronyd

# chronyc sources

⑦Rocky Linuxの終了
# shutdown -h now