12
12

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 5 years have passed since last update.

bashのキーバインド(キーボードショートカット) まとめ

Last updated at Posted at 2016-05-28

移動系

key 説明
Ctrl + a 行頭へ移動
Ctrl + e 行末に移動
Ctrl + b 1文字戻る
Ctrl + f 1文字進む

削除系

key 説明
Ctrl + d カーソル位置にある文字を削除
Ctrl + k カーソル位置から行末まで削除
Ctrl + u 行頭からカーソル位置まで削除
Ctrl + w カーソル位置からその左側の最初のスペースまで削除(スペースが無い場合は行頭まで削除)
Ctrl + h カーソルの左にある1文字を削除(BackSpaceに相当)
Ctrl + y 削除した文字を貼り付ける

表示系

key 説明
Ctrl + l 画面をクリアしてカレント行(現在いる行)を再表示する
Ctrl + q 画面への出力を再開
Ctrl + s 画面への出力を停止
Ctrl + t カーソル位置の文字とその左側の文字を入れ替える

検索系

key 説明
Ctrl + r 前打ったコマンドを検索

コマンド系

key 説明
Ctrl + m コマンドを実行
Ctrl + n コマンド履歴の1つ後ろのコマンドの表示
Ctrl + p コマンド履歴の1つ前のコマンドの表示
Ctrl + c 現在のコマンドを強制終了
Ctrl + z 現在のコマンドを一時停止
!! 1つ前に実行したコマンドを再実行

おまけ

# set -o vi

とするとキー操作がviスタイルになる。
emacsスタイルに戻したい場合は、以下のコマンドを実行すればOK。

# set -o emacs
12
12
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
12
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?