Skip to main content

Linux Command memo

大学のServerで export: Command not found.がでてきて、 何か悪いことをしたのかと思い、焦ったのですが、 そもそもshellに種類があるらしいです。

  1. setenv:csh系
  2. export:sh系

tcshコマンドメモ

  1. set var1 = ham → シェル変数
  2. setenv var2 egg → 環境変数
  3. alias python python3 → pythonで2系が出ないようにする

Shellについてメモ

  1. shell: UNIX系OSで操作するスクリプトの一種(bashやtcsh, ksh,zsh,fishなど無数に存在)
  2. カーネルとシェルは分離。
  3. sh, bash, schはログインしたときに適用されるタイプ。
  4. Bシェル系(sh,bash,...)とCシェル系(csh, tcsh)。
  5. echo $SHELL → tcshを使っていました。
  6. cat /etc/shells → 8つでてきました。(screenやtmuxも)
  7. 'cat /etc/profile' → 起動時に読み込まれるファイル

環境変数についてメモ

  1. シェル変数:実行中のシェルだけで有効
  2. 環境変数:子プロセスでも有効

REF