1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Linuxでプロンプトの色を変更する方法(個人メモ)

Posted at

プロンプトの色を変更する

  • いろんな環境のターミナルを開いてる場合(それが良くないっていう指摘もありそうだけど),違う環境を操作しないようにターミナルに色を付けたい.
  • 以下を ~/.bashrc に記載する(CentOSの場合で,他のOSは不明).
PS1_COLOR_BEGIN="\[\e[1;36m\]"
PS1_COLOR_END="\[\e[m\]"
export PS1="${PS1_COLOR_BEGIN}[\u@\h \W]\\$ ${PS1_COLOR_END}"
  • 簡単に言うと,ここから xxx色です,という指定を入れる,という記述.実際にコマンドを入力する際は白にしたかったので,ENDを入れている.
  • どういう指定が可能かは未確認.
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?