(同じ利用者による、間の6版が非表示) | |||
1行目: | 1行目: | ||
==シェル変数 >> 環境変数== | |||
環境変数はシェル変数の一部をコピーして準備される。そのため、シェル変数が 1,000個ほどあるのに対して環境変数は 20個ほどしかない。以下はその一部。 | |||
{| class="wikitable" summary="シェル変数と環境変数" | |||
|- | |||
!変数名 | |||
!値の例 | |||
|- | |||
|<code>SHELL</code> | |||
|/bin/bash | |||
|- | |||
|<code>BASH_VERSION</code> | |||
|4.4.12(1)-release | |||
|- | |||
|<code>HISTFILE</code> | |||
|/home/pi/.bash_history | |||
|- | |||
|<code>HISTSIZE</code> | |||
|1000 | |||
|- | |||
|<code>HOME</code> | |||
|/home/pi | |||
|- | |||
|<code>HOSTNAME</code> | |||
|raspi.local | |||
|- | |||
|<code>PATH</code> | |||
|/usr/local/sbin:/usr/local/bin | |||
|- | |||
|<code>LANG</code> | |||
|en_US.UTF-8 | |||
|} | |||
コマンドをいちいち「/root/bin/bash」とか打たなくても良くなる。シェルがコマンドの場所を探せるようにするため「'''コマンドサーチPATH'''」を通す。 | |||
$ export PATH=$PATH:/usr/local/bin | |||
==関連コマンド== | ==関連コマンド== | ||
{| class="wikitable" summary="bash関連コマンド" | {| class="wikitable" summary="bash関連コマンド" | ||
9行目: | 46行目: | ||
!bashbug | !bashbug | ||
|is a utility for reporting bugs in Bash to the maintainers.bashbug will start up your preferred editor with a preformatted bug report template for you to fill in. Save the file and quit the editor once you have completed the missing fields. bashbug will notify you of any problems with the report and ask for confirmation before sending it. By default the bug report is mailed to both the GNU developers and the Debian Bash maintainers. The recipients can be changed by giving a comma separated list of bug-report-email-addresses. | |is a utility for reporting bugs in Bash to the maintainers.bashbug will start up your preferred editor with a preformatted bug report template for you to fill in. Save the file and quit the editor once you have completed the missing fields. bashbug will notify you of any problems with the report and ask for confirmation before sending it. By default the bug report is mailed to both the GNU developers and the Debian Bash maintainers. The recipients can be changed by giving a comma separated list of bug-report-email-addresses. | ||
|- | |||
!dh_bash-completion | |||
|is a debhelper program that is responsible for installing completions for bash, usable installing the "bash-completion" package. | |||
|} | |} | ||
14行目: | 54行目: | ||
{| class="wikitable" summary="bash関連コマンド" | {| class="wikitable" summary="bash関連コマンド" | ||
!dash | !dash | ||
|is the standard command interpreter for the system. | |is the standard command interpreter for the system. Debian Almquist Shell | ||
|} | |} |
2023年1月2日 (月) 21:20時点における最新版
シェル変数 >> 環境変数
環境変数はシェル変数の一部をコピーして準備される。そのため、シェル変数が 1,000個ほどあるのに対して環境変数は 20個ほどしかない。以下はその一部。
変数名 | 値の例 |
---|---|
SHELL
|
/bin/bash |
BASH_VERSION
|
4.4.12(1)-release |
HISTFILE
|
/home/pi/.bash_history |
HISTSIZE
|
1000 |
HOME
|
/home/pi |
HOSTNAME
|
raspi.local |
PATH
|
/usr/local/sbin:/usr/local/bin |
LANG
|
en_US.UTF-8 |
コマンドをいちいち「/root/bin/bash」とか打たなくても良くなる。シェルがコマンドの場所を探せるようにするため「コマンドサーチPATH」を通す。
$ export PATH=$PATH:/usr/local/bin
関連コマンド
コマンド | 概要 |
---|---|
rehash c_rehash openssl-rehash openssl-c_rehash |
Bashが利用するハッシュテーブルを再構築。rehash scans directories and calculates a hash value of each ".pem", ".crt", ".cer", or ".crl" file in the specified directory list and creates symbolic links for each file, where the name of the link is the hash value. |
bashbug | is a utility for reporting bugs in Bash to the maintainers.bashbug will start up your preferred editor with a preformatted bug report template for you to fill in. Save the file and quit the editor once you have completed the missing fields. bashbug will notify you of any problems with the report and ask for confirmation before sending it. By default the bug report is mailed to both the GNU developers and the Debian Bash maintainers. The recipients can be changed by giving a comma separated list of bug-report-email-addresses. |
dh_bash-completion | is a debhelper program that is responsible for installing completions for bash, usable installing the "bash-completion" package. |
その他のShell
dash | is the standard command interpreter for the system. Debian Almquist Shell |
---|