2016-10-29 7 views

答えて

0

デフォルトシェル - あなたはbashのコマンドを入力しながら> zshのは、あなたがSHを入力すると、Ubuntuのデフォルトのシェルはダッシュで、あなたは、ダッシュのコマンドがない

ls -l /bin/sh 
output: 
/bin/sh -> /bin/dash 

が終了してそれを得ることができますbash環境を入力し、exitはbashコマンドです。同じ結果を得るには/ bin/sh/bin/bashへのシンボリックリンクを変更できます。

0

どちらもシェルプロンプトです.1つはdash、もう1つはbashです。 bashdashの両方とも、同じブートプロンプトを持つように設定することができます(そのようなプロンプトの任意の性質を示す、あなたが望むものではありませんが、実行できることを示すために)。$PS1変数を調整します。 man bashから:

PS1 The value of this parameter is expanded (see PROMPTING below) 
      and used as the primary prompt string. The default value is 
      ``\s-\v\$ ''. 
    PS2 The value of this parameter is expanded as with PS1 and used as 
      the secondary prompt string. The default is ``> ''. 
    PS3 The value of this parameter is used as the prompt for the select 
      command (see SHELL GRAMMAR above). 
    PS4 The value of this parameter is expanded as with PS1 and the 
      value is printed before each command bash displays during an 
      execution trace. The first character of PS4 is replicated mul‐ 
      tiple times, as necessary, to indicate multiple levels of indi‐ 
      rection. The default is ``+ ''. 

(スペースを表示するために2つのコロンの間に)プロンプトの様々なレベルを印刷するために、dashbashに以下forループを実行してみてください。 dashに表示される内容は次のとおりです。

for f in PS1 PS2 PS3 PS4 ; do eval echo :\$$f: ; done 
:$ : 
:> : 
:: 
:+ : 
関連する問題