LoginSignup
0
3

More than 5 years have passed since last update.

Macでls -lの短縮コマンドをエイリアスに登録

Last updated at Posted at 2018-11-09

はじめに

Macでls -lコマンドをllと短縮すると利用できない、、
不便だなーと感じたので、aliasコマンドを利用し、コマンドの短縮を実現しました。
aliasをシェルスクリプトに記載し、これをMac起動時に実行されるようにします。

 .bash_profileへ記述

Macのホームディレクトリで.bash_profileに以下の記述を記述します。
.bash_profileがない方は新規に作成することになります。

if [ -f ~/.bashrc ]; then
        . ~/.bashrc;
fi

 .bashrcへ記述

実行したいaliasコマンドを記述します。
このファイルに関しても、ない場合は新規に作成します。

alias ll='ls -l'
0
3
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
3