Mac
2018-07-15 (Sun) · 160 words

Homebrew install

  1. XcodeをApp storeからインストール
  2. $ xcode-select --install
  3. $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  4. インストール完了確認 $ brew doctor Your system is ready to brew.

bash_profile

$ touch ~/.bash_profile
$ vi ~/bash_profile
# PATH
if [ -f ~/.bashrc ]; then
  . ~/.bashrc
fi

bashrc

$ touch ~/.bashrc
$ vi ~/.bashrc
# Alias Setting
alias ls='ls -FG'
alias ll='ls -alFG'

# Permmision View Setting
if [ $UID -eq 0 ]; then
    PS1="\[\033[31m\]\u@\h\[\033[00m\]:\[\033[01m\]\w\[\033[00m\]\\$ "
else
    PS1="\[\033[36m\]\u@\h\[\033[00m\]:\[\033[01m\]\w\[\033[00m\]\\$ "
fi

#for bash_completion
if [ -f $(brew --prefix)/etc/bash_completion ]; then
  source $(brew --prefix)/etc/bash_completion
fi

# git ps1
source /usr/local/etc/bash_completion.d/git-prompt.sh
source /usr/local/etc/bash_completion.d/git-completion.bash
GIT_PS1_SHOWDIRTYSTATE=true
export PS1='\[\033[37m\][\[\033[36m\]\u\[\033[37m\]@\h \[\033[32m\]\W\[\033[37m\]]\[\033[31m\]$(__git_ps1)\[\033[00m\]\$ '

Git

$ brew install git
$ git config --global user.name HOGE
$ git config --global user.email HOGE

Homebrew cask

$ brew tap caskroom/cask

キー操作

  1. capsキーをcommandキーへ割り当て 「システム環境変数」「キーボード」「修飾キー」
    Caps Lockをcommandへ割り当てる

  2. コピーする時に元のスタイルを保持しない 「システム環境変数」「キーボード」「ショートカット」「アプリケーション」「’+’ボタン押下」
    メニュータイトル:ペーストしてスタイルを合わせる キーボードショートカットキー:command + v

  3. ホスト名の変更 ターミナルから変更する

    $ hostname
    hogehoge
    $ scutil --set ComputerName 'mbp'
    $ hostname
    mbp
    

システム環境変数から変更する
「共有」「コンピュータ名を編集」

Finder設定

環境設定 → 詳細 → 「すべてのファイル名拡張子を表示」にチェック

ドットファイルの表示方法

command + shit + ‘.’


Top     back     Posts     Tags     About Me