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?

bashの基本キー操作

Posted at

bashとは

bash(Bourne Again SHell)は、Unix系のオペレーティングシステムで利用されるシェルの一つ。シェルとは、ユーザーが入力したコマンドを解釈し、OSに実行させるためのソフトウェア。


bash操作に役立つキー操作

カーソル移動

キー 動作
Ctrl + A 行の先頭に移動
Ctrl + E 行の末尾に移動
Ctrl + F 1文字前進(右)(→キーと同じ)
Ctrl + B 1文字後退(左)(←キーと同じ)
Alt + F 1単語前進
Alt + B 1単語後退

文字の削除(切り取り)・貼り付け

キー 動作
Ctrl + D カーソル位置の文字を削除(Deleteと同じ)
Ctrl + H カーソル前の文字を削除(Backspaceと同じ)
Ctrl + K カーソル位置から行末まで切り取り
Ctrl + U カーソル位置から行頭まで切り取り
Ctrl + Y 切り取った(削除した)コマンドの貼り付け
Ctrl + W カーソル前の単語を削除
Alt + D カーソル後の単語を削除

コマンド履歴

キー 動作
Ctrl + P 前のコマンド(↑キーと同じ)
Ctrl + N 次のコマンド(↓キーと同じ)
history コマンド履歴を表示
!! 直前のコマンドを実行
!n 履歴のn番目のコマンドを実行

プロセス制御

キー 動作
Ctrl + C 実行中のプロセスを強制終了

便利な機能

キー 動作
Tab コマンド・ファイル名の自動補完
Tab Tab 補完候補を一覧表示

参考文献

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?