2
4

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基本操作(Linuc1/101試験)

Last updated at Posted at 2018-04-15

bashの基本操作##


操作 説明
Tab 補完
Ctrl + A 行の先頭へカーソル移動
Ctrl + E 行の最後へカーソル移動
Ctrl + D カーソル部分を1文字削除、ログアウトする
Ctrl + H カーソルの左を1文字削除
Ctrl + L 画面をクリアしてカレント行を再表示する
Ctrl + C 処理を中断する
Ctrl + S 画面への出力を停止する
Ctrl + Q 画面への出力を再開する
Ctrl + Z 処理を一時停止する

 

ディレクトリの指定##


操作 説明
~ ホームディレクトリ
. カレントディレクトリ
.. 1つ上のディレクトリ

 

複数のコマンドの実行制御##


コマンド 説明
1 ; 2 1に続いて2を実行
1 && 2 1が正常終了した場合のみ2を実行
1 || 2 1が正常に終了しなかった場合のみ2を実行|
(1 ; 2) 1と2をひとまとまりのコマンドグループとして実行
{1;2;} 現在のシェル内でコマンド1と2を実行する

 

引用符##


引用符 説明
' 文字列
" 文字列、変数があればその内容が展開される
` バッククォーテーション内のコマンドの実行結果を表示

 

履歴機能##


コマンド 説明
↑(Ctrl+P) 1つ前のコマンドを表示
↓(Ctrl+N) 1つ次のコマンドを表示
!文字列 実行したコマンドの中で指定した文字列から始まるコマンドを実行
!! 直前に実行したコマンドを再実行する
!履歴番号 履歴番号のコマンドを実行する
2
4
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
2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?