Setup working environment in Mac

After that, as I have got my laptop back from the service centre I had to install all applications from scratch and also I needed setting my working environment again. I wanted to share my steps in the past which I always follow to set up a new environment but I didn’t have enough time to do it. My refurbished laptop finally motivated me to do that.

Making your hidden files visible, run this command in the terminal:

defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder
  • Install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  • Install wget (to download files via console)
brew install wget
  • Install iTerm2
brew install iTerm2
  • Install Fonts
brew tap homebrew/cask-fonts && brew install font-source-code-pro
  • Download file project from GitHub and use  .sh extension to install ( ./install.sh)
https://github.com/powerline/fonts

Go in iTerm2 => Preferences => Profiles => Text and make check by „Use built-in Powerline glyphs“

Go to the standart terminal: terminal = > Einstellungen  => Allgemein = > Shells öffnen mit => and write the string “/bin/sh”

  • Install the colour theme in iTerm2

Go to the page: https://iterm2colorschemes.com,  chose any colour schema for example https://raw.githubusercontent.com/mbadolato/iTerm2-Color-    Schemes/master/schemes/Seafoam%20Pastel.itermcolors download it and import via terminal settings.

Use the shortcut CMD+i in the running iTerm2
Navigate to Colors tab
Click on Load Presets
Click on Import
Select the .itermcolors file(s) of the scheme(s) you'd like to use
Click on Load Presets and choose a color scheme
  • Install ZSH, it is a Shell over standard bash with the extra features
brew install zsh
  1. Install and setup framework “Oh My Zsh” to manage zsh, during installation it would offer to change the standard shell to zsh,  if it is not happened, use the command: chsh -s $(which zsh)
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  • Setup the standard theme in Zsh. You should open the file .zshrc in your home directory, find the line ZSH_THEME and write the agnoster like below:
ZSH_THEME=„agnoster“
  • In the end of the file write the below line. It will disable user name and pc name in the console line
export DEFAULT_USER="$(whoami)"
  • After each changes of the .zshrc file you should restart the console ti apply the changes with the following command:
source ~/.zshrc
  • If you have any security message after you started the zsh, just run this command:
compaudit | xargs chmod g-w,o-w
  • Install syntax highlighting in your console
brew install zsh-syntax-highlighting
  • Setup syntax highlighting. To activate the syntax highlighting, add the following at the end of your .zshrc:
source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  • Setup the program which will show you your directory as a tree:
brew install tree

Use the command in the iTerm2: tree -L 1

this command shows you the current directory with the nested level 1

  • Adb Install to debug android applications and to manage android devices remotely
brew install android-platform-tools

That’s all. It is my working setup to code.

Next time I will write post how to quick copy or transfer files in the console from one server to another.

Leave a Reply

Your email address will not be published.