When you work as a software developer from a MacOS, it is common to spend hours with the terminal window open, because from there you have the opportunity to run different scripts that translate into tasks or configurations that you order to your system.
If you do not feel satisfied with the colors and general appearance of your current terminal, we will tell you that there are ways you can have a custom interfaceif you are interested in knowing how, continue reading and we will tell you right away.
How to configure the macOS terminal for developers?
Apple has been concerned with making the the most pleasant user experience, considering that the tastes and needs of each person are different. In addition, these promote individuality through system customization, from changing the desktop background image or screen of my MacBook to modifying the appearance in the terminal.
The OS X terminal is characterized by its extremely basic white background colors and black text, however, many users have discovered the customization and execution benefits of iTerm2if you are interested in knowing how to activate it on your Mac, now we will tell you.
You, as an advanced user of the OS system, are usually aware of configuring aspects of the computer that allow you to carry out daily tasks in comfort, perhaps you have already taken actions such as customizing the upper bar of the Finder and now you are looking for a way to adjust the terminal. For this you must start installing the homebrew package manager.
First of all, you must have Apple’s application development toolkit, Xcode, installed, in case you don’t have it, open a traditional terminal and enter the command “xcode-select – install”. Then it’s time to install Homebrew, for this you enter the command “/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”.
Find and install iTerm2
Now it’s time to install iTerm2, an application that has the characteristics; the change in the color of labels, depending on the current state of each tab, selection in an intelligent way, through double and triple clicks, setting the Option Key as a meta key, and the option to customize a specific color scheme, which is what we are looking for in this case. Starting from the same terminal window, you must enter “brew cask install iterm2”.
Install ZSH and Oh-My-ZSH
To be able to customize the iTerm environment both in sources and themes and windows, you must comply with a few more steps, it is about install the Oh My-ZSH plugin, which in turn requires you to install ZSH first, by executing the following statement in the terminal “brew install zsh”. Now you will need to choose a download code depending on your environment, for Wget “sh -c “$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)”, while than in Curl “sh -c “$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)”
Find, install and customize a theme
For all developers, the shell command line system, ZSH, will be familiar, although today we will focus on taking advantage of the console utility framework, Oh My Zsh, in customizing the graphic theme and installing plugins in our terminal. this plugin offers a catalog of more than 150 themes of personalization.
- To display them in alphabetical order and choose the one of your preferencego to: https://github.com/ohmyzsh/ohmyzsh/wiki/Themes.
- Next, execute in the terminal “open ~/.zshrc “, to open the file in a text editor.
- Locate the variable “ZSH_THEME” and edit it with the theme name of your choice, for example, “ZSH_THEME=”agnoster””.
- Now to customize the chosen theme, you must close the current terminal and open iTerm2go to “Preferences➝ Profiles ➝ Colors”, there locate the “Color Presets” button in the lower right corner, where you can choose the color palette that you like.
How to use my Mac’s terminal command line?
If you are not yet a MacOs user, first of all buy your MacBook from the official Apple site, in this way you can enjoy the process from the comfort of your home, and you can have access to benefits and advantages that these devices offer.
For example, a repowered and personalized terminal tailored to your needs. iTerm2 is a terminal alternative that allows you several extra functionalities, if you have already installed it now it is convenient for you learn a little more about how it worksso read on.
Using basic commands
There are a series of basic commands in iTerm2 which let you from hide MacBook Dock, to run, new tag: command + t, close tag: command + w, switch to full screen: command + enter, search: command + f, vertical split screen: command + d and screen horizontal split: command + shift + d.
Using advanced commands
With iTerm2 you can also run advanced features that become especially useful in your tasks as a developer, among them, Triggers, with which you can configure heatsinks for keywords, Badge, which assigns a watermark to each window facilitating its identification, or escape-codes, which allows you to configure actions when a command is entered in a specific window.