0
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 3 years have passed since last update.

エイリアス(alias)の設定方法

Last updated at Posted at 2021-08-12

エイリアスとは?

エイリアス 【alias】:偽名、別名、通称などの意味を持つ英単語。

つまり、コマンドの別名を設定します。
いくつかのコマンドをまとめて別の名前に設定することが出来ます。

例えば、ls -al と打っていたのを ll と打つだけで実行出来るようにする事が出来ます。

$ ll

↑ls -lと同じ

設定方法

$ vim ~/.zshrc

でファイルを開き

Set up aliases
alias dc='docker-compose'
alias ll='ls -alF'

と書き換える。

$ source ~/.zshrc 

で実行

よく設定されているもの

$ dc up -d          #docker 立ち上げ
0
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
0
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?