0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Linuxコマンド早見表

Posted at

Linuxコマンド早見表

日常的によく使うLinuxコマンドのチートシートです。初心者から中級者まで、素早く確認したいときにどうぞ。


ファイル・ディレクトリ操作

コマンド 説明
ls ファイル一覧を表示
ls -l 詳細表示(パーミッション等)
cd /path/to/dir ディレクトリを移動
pwd 現在のディレクトリを表示
mkdir newdir 新しいディレクトリを作成
rm file ファイルを削除
rm -r dir ディレクトリを再帰的に削除
cp src dest ファイルをコピー
mv src dest ファイルを移動・リネーム
touch file 空のファイルを作成

ファイル内容の確認・検索

コマンド 説明
cat file ファイル内容を表示
less file ページ送りで表示
head -n 10 file 先頭10行を表示
tail -n 10 file 末尾10行を表示
grep 'keyword' file キーワードを検索
find . -name '*.log' 特定ファイル名を検索
wc -l file 行数をカウント

プロセスとシステム

コマンド 説明
ps aux 実行中のプロセスを一覧表示
top リアルタイムで監視
kill PID プロセスを終了
df -h ディスク容量の確認
du -sh dir ディレクトリのサイズを確認
uptime システムの稼働時間を表示
free -h メモリ使用状況を表示

権限・所有者

コマンド 説明
chmod 755 file 実行権限などを変更
chown user:group file 所有者を変更
ls -la パーミッションを確認

ネットワーク

コマンド 説明
ping google.com 接続確認
curl http://example.com HTTPリクエストを送信
wget http://example.com ファイルをダウンロード
ifconfig / ip a IPアドレスなどを確認
netstat -tuln ポートの使用状況を確認

パッケージ管理(Debian系)

コマンド 説明
sudo apt update パッケージ情報を更新
sudo apt upgrade アップグレード
sudo apt install <pkg> パッケージをインストール
sudo apt remove <pkg> パッケージを削除

その他便利系

コマンド 説明
history コマンド履歴を表示
alias ll='ls -l' コマンドのエイリアス設定
crontab -e 定期実行ジョブの編集
man <command> マニュアルの表示

Tips

  • tabキーでコマンド補完
  • Ctrl + C:コマンド中断
  • Ctrl + D:ログアウトまたはEOF送信
  • !!:直前のコマンドを再実行
  • sudo !!:直前のコマンドをsudo付きで再実行

最後に

Qiitaのコメント欄でも、おすすめコマンドやTipsがあればぜひ教えてください!

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?