Learning the shell — Lesson 1: What is the shell?

Shuma Mizuno
Sep 5, 2018 · 3 min read

学習日: 180905
所要時間: 2時間

What Is “The Shell”?

シェルは、ユーザが入力したコマンドを解釈してカーネル(OS)に処理を依頼するプログラム。

ユーザから見てカーネルの周りをすっぽり覆っている「殻」(shell) のように見えることからシェルと呼ばれるらしい。

What Is The Difference Between Shell, Console, And Terminal?https://fossbytes.com/difference-between-shell-console-terminal/

シェルの種類
GUI
Finder など。

CLI
bash, sh, ksh, tcsh, zsh など。

What’s A “Terminal

正確にはterminal emulatorと呼ばれる。
windowを開いたり、キーボード入力を取得したりするプログラム。
実際に命令を解釈しOSへ伝達する役割はシェルがおこなっている。

ターミナルの種類
gnome-terminal, konsole, xterm,rxvt, kvt, nxterm, and eterm など。

Starting A Terminal

KDEとは Gnomeとは
X Window System上で動作するデスクトップ環境およびその環境用の各種アプリケーション。

ターミナルプログラムの呼び方の違い
KDEユーザー: konsole
Gnomeユーザー: gnome-terminal

GNOME vs. KDE
https://www.diffen.com/difference/GNOME_vs_KDE

呼び方などの違いがある一方でどのターミナルも同じことができる。

Testing The Keyboard

ひとつ前のコマンドを呼び出す
Ctrl-p (Control+p) または上矢印 (↑)

ひとつ後のコマンドを呼び出す
Ctrl-n (Control+n) または下矢印 (↓)

ユーザーの種類
$: 一般ユーザ ー
%: 一般ユーザー
#: rootユーザー

rootとは
すべてのファイルにアクセス可能で、アカウントのパスワード変更などもおこなえる強力な権限。
rootユーザは一般的にUNIX系OSの管理者アカウントを差し、Windows系OSのAdministratorに当たる。

root Definition
http://www.linfo.org/root.html

Using The Mouse

CLIだけどマウス操作も便利。
ほかのアプリケーションから文字列のコピペができる。

質問事項

特になし

所感

エンジニアの共通言語が少しずつわかってくる感じめでたい。

メモ

ttyについて ttyやptsってなんぞ?
http://takuya-1st.hatenablog.jp/entry/20101024/1287947368

    Shuma Mizuno

    Written by

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade