LoginSignup
0
0

More than 3 years have passed since last update.

よく使うLinuxコマンド

Last updated at Posted at 2017-12-10

全文検索

grep -ir [string]

ヒアドキュメント

cat << EOS
hoge
fuga
piyo
EOS

リダイレクト含む

cat <<EOF > test
line1
line2
line3
EOF

LISTENポート表示

a:すべてのポートを表示
l:LISTENポートのみ表示
u:UDPポート表示
t:TCPポート表示
n:ポートを番号で表示
4:IPv4のみ表示

ss -lutn4

ポート開放(firewalld)

一時的なポート開放(443の場合)

# firewall-cmd --zone=public --add-port=443/tcp

恒久的なポート開放(443の場合)

# firewall-cmd --zone=public --add-port=443/tcp --permanent

リロード

# firewall-cmd --reload

設定確認

# firewall-cmd --list-all

特定ポート疎通確認

curlを用いて特定ポート確認

# curl -v telnet://<hostname or ip address>:80
0
0
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
0