Linuxターミナルのショートカット一覧

使用頻度が高いショートカット

数が多くなってしまった。
なので、よく使う…と思うショートカットを厳選。
いきなり全部は覚えられないので、とりあえずはコレを覚えよう。

入力 説明
Ctrl+B 1文字 戻る (Back)、と同じ
Ctrl+F 1文字 進む (Forward)、と同じ
Ctrl+P 1つ前(Previous)の履歴、と同じ
Ctrl+N 次(Next)の履歴、と同じ
Tab 入力補完
Ctrl+_ もとに戻す (Undo)
Ctrl+C 実行中のコマンドを強制終了
Ctrl+Z 実行中のコマンドを一時停止
Ctrl+D ターミナルを終了
Ctrl+L clearコマンドと同じ

ショートカット一覧

カーソルの移動

入力 説明
Ctrl+B 1文字 戻る (Back)、と同じ
Ctrl+F 1文字 進む (Forward)、と同じ
Alt+B 1単語 戻る (Back)
Alt+F 1単語 進む (Forward)
Ctrl+A 行頭へ、Homeと同じ
Ctrl+E 行末へ、End
Ctrl+XX -

文字の削除

入力 説明
Ctrl+H カーソルの左1文字を削除、Back Spaceと同じ
Ctrl+D 1文字 削除、Deleteと同じ
Alt+D カーソルから右を削除

タイプミスの修正

入力 説明
Ctrl+_ もとに戻す (Undo)
Alt+T カーソルのある単語と1つ前の単語を入替
Ctrl+D 1つ前の文字と2つ前の文字を入替

切取、貼付

入力 説明
Ctrl+W カーソルより左を切取(単語)
Ctrl+D カーソルより右を切取(行)
Ctrl+U カーソルより左を切取(行)
Ctrl+Y 貼付

大文字・小文字

入力 説明
Alt+U カーソルから右の文字を大文字に変換(単語)
Alt+L カーソルから右の文字を小文字に変換(単語)
Alt+C カーソル位置の1文字を大文字/小文字に変換

履歴

入力 説明
Ctrl+P 1つ前(Previous)の履歴、と同じ
Ctrl+N 次(Next)の履歴、と同じ
Alt+R 履歴の変更を取消

インクリメンタル検索

入力 説明
Ctrl+R インクリメンタル検索
Ctrl+G インクリメンタル検索を終了

画面

入力 説明
Ctrl+L clearコマンドと同じ
Ctrl+S 画面出力を停止
Ctrl+Q 画面出力を再開

プロセス

入力 説明
Ctrl+C 実行中のコマンドを強制終了
Ctrl+Z 実行中のコマンドを一時停止
Ctrl+D ターミナルを終了

テキストエディタの切替

シェル オプションの一覧表示

set -o

viに切替

set -o vi

emacsに切替

set -o emacs

例文002(基礎英文解釈の技術100)

  1. In the development of civilization the use of tools grew and multiplied.
  2. Later the use of stream power revolutionized the whole industrial organization and transportation.

In the development of civilization the use of tools grew and multiplied.

f:id:Erikr:20210102232142p:plain

M:文明の発展の中で S:道具の利用 V:成長し、分化した

Later the use of stream power revolutionized the whole industrial organization and transportation.

f:id:Erikr:20210102232509p:plain

M:後に S:蒸気機関の利用 V:変革を起こした O:産業全体の構造と輸送

例文001(基礎英文解釈の技術100)

  1. Words are not the only means of communication.
  2. Gestures also communicate.
  3. Some gestures are used in more than one culture.
  4. Others differ from culture to culture.

Words are not the only means of communication.

f:id:Erikr:20210102222605p:plain
S:言葉 V:ではない C:唯一の方法 M:コミュニケーションの

※"more than one"で「一つより多い」

Gestures also communicate.

f:id:Erikr:20210102222735p:plain

S:ジェスチャ M:もまた V:コミュニケートする

Some gestures are used in more than one culture.

f:id:Erikr:20210102222518p:plain

S:あるジェスチャ V:使われる M:二つ以上(の文化)の中で

Others differ from culture to culture.

f:id:Erikr:20210102223228p:plain

S:他(のジェスチャ) V:異なる M:文化ごとに

Jupyter Notebookのインストール (Anaconda)

環境の作成

作成

conda create -n [環境名] python=[バージョン]

f:id:Erikr:20210102181648p:plain

切替

conda activate -n [環境名]

f:id:Erikr:20210102181847p:plain

Jupyterのインストール

conda install -c anaconda jupyter

f:id:Erikr:20210102184655p:plain

Jupypter Notebookの起動

起動

# コマンド末尾の"&"は、バックグラウンドで実行させるため
jupyter notebook &

f:id:Erikr:20210102185303p:plain

一覧

jupyter notebook list

f:id:Erikr:20210102185325p:plain

接続

f:id:Erikr:20210102190321p:plain

f:id:Erikr:20210102190900p:plain

f:id:Erikr:20210102190747p:plain







仮想環境の作成 (Anaconda)

Conda環境の開始・終了

Conda環境の開始

conda activate

f:id:Erikr:20210102142628p:plain

・確認:プロンプトに"(base)"が表示

Conda環境の終了

conda deactivate

f:id:Erikr:20210102142655p:plain

・確認:プロンプトの"(base)"が消える

環境の一覧

conda infoのヘルプ

conda info -h

環境の一覧

conda info -e

f:id:Erikr:20210102141344p:plain

環境の作成

環境の作成

# conda create -n [環境名] python=[バージョン]
conda create -n test01 python=3.8

f:id:Erikr:20210102142033p:plain

f:id:Erikr:20210102142310p:plain

・環境"test01"が作成されている。

環境の切替

conda activateのヘルプ

f:id:Erikr:20210102143048p:plain

環境の切替

# conda activate [環境名]
conda activate test01

f:id:Erikr:20210102143225p:plain

環境の削除

環境の削除1

# conda env remove -n [環境名]
conda env env remove -n test01

f:id:Erikr:20210102144450p:plain

環境の削除2

# conda remove -n [環境名] --all
conda env remove -n test01 --all

f:id:Erikr:20210102144026p:plain