LoginSignup
1
0

More than 3 years have passed since last update.

~/.bash_profileをいじってターミナルの$前をカスタマイズ

Last updated at Posted at 2019-05-20

変更前

shun:~ matsumurashun$ ssh 172.168.XX.XXX

変更後

(☝ ՞ਊ ՞)☝ $ ssh 172.168.XX.XXX

やったこと

~/.bash_profileを編集

このファイルは、ログイン時に1度実行されるファイルのようです。
なので、terminalを起動したらこのファイルが1度だけ読み込まれます。
環境変数とかを記述しておくようです。

~/.bash_profile
export PS1 = "(☝ ՞ਊ ՞)☝ \W $ "

このPS1という部分が$前を示しているので、デフォルトを書き換えてあげる。
\Wをつけないと今いるディレクトリを出力してくれないので注意。
ペアプロとかした時に変人扱いされそう。

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