.bashrcファイルを復元する方法

In Ubuntu, there is a default version of the .bashrc file in the /etc/skel/ directory, so if you have problems with it you can restore it.

To do so follow the next steps:

1. Backup your current .bashrc file:

    cp ~/.bashrc ~/.bashrc.bak

2. Copy the skeleton .bashrc file over yours:

    cp /etc/skel/.bashrc ~/

3. Afterwards, load the new one:

    source ~/.bashrc

ソ-ス:bash - How to restore .bashrc file? - Ask Ubuntu

弄り回していたので。


関連:

・ コマンド履歴に日付も付加
echo "HISTTIMEFORMAT='%F %T '"    >> .bashrc

・ ヒストリ無視パターンを設定する.
  cd とか ls とか ps とか top など3文字までのコマンド入力や exit はヒストリに残す価値なし.
echo "export HISTIGNORE='?:??:???:exit'" >> .bashrc


スケルトンファイル | ウナのLinux講座 | ウナのIT資格一問一答

bashのプロンプトを変更するには

Bashのプロンプトに色を付けてサーバやユーザを区別する - Qiita
f:id:nonbei:20190305150407p:plain