LoginSignup
5
4

More than 5 years have passed since last update.

ターミナルでよく移動するディレクトリに即移動する

Last updated at Posted at 2016-03-30

まず~/.bashrcに設定を書き込む

~/.bashrc
alias cdhoge="cd ~/hoge/piyo" #移動したいディレクトリ名を書く

次に~/.bashrcの設定を読み込む

source ~/.bashrc

これでcdhogeと打てばcd ~/hoge/piyoに飛ぶ。

参考リンク

・ターミナル起動時に.bashrcを読み込むようにする
http://blog.ruedap.com/2010/09/13/mac-bash-bashrc
・cdしたらlsする
http://qiita.com/b4b4r07/items/8cf5d1c8b3fbfcf01a5d
・z.shでよく行くディレクトリに手軽に移動する
http://qiita.com/yoshikaw/items/38d3008ac7d0b19b4805

5
4
4

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
5
4