Меню Рубрики

Install zsh mac os

Настройка ZSH в Mac OS

С недавних пор начал использовать Mac OS, почти сразу подумал, что стандартный терминал не очень-то и удобен.

В качестве оболочки будем использовать ZSH, о нём, думаю, не слышал только любитель красивых UI, а вместо стандартного терминала я использую iTerm2.

В Mac OS ZSH предустановлен, поэтому сразу устанавливаем его в качестве оболочки по умолчанию с помощью команды chsh -s /bin/zsh . После перезапуска терминала оболочкой должен быть уже ZSH, если попросит начать настройку, то прервём сей процесс, нажав q.

Ручками мы писать конфиги, разумеется, не будем, пусть это сделает “Oh My Szh”. Переходим в домашний каталог и выполняем:

Следующим шагом откроем для редактирования файл

/.zshrc и изменим значение параметра ZSH_THEME на agnoster , сохраняемся и перезапускаем терминал. В этот момент вы, скорее всего, увидите криво (никак) отображаемые символы, всё это происходит из-за некоторых отсутствующих шрифтов в системе, исправим это:

  1. Скачаем архив — вот здесь .
  2. Перейдём в “ fonts-master/UbuntuMono/” и установим все шрифты в этой директории.
  3. В настройках терминала выставляем шрифт “ Ubuntu Mono derivative Powerline”.

После перезапуска терминала вы, наконец, сможете узреть нормально работающую тему “agnoster”.

Источник

derhuerst / intro.md

Installing zsh – the easy way

The Z shell (zsh) is a Unix shell [. ]. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.

Choose one of the following options.

Some Linux systems come preloaded with zsh. You can check if it exists as well as its version by writing zsh —version in a terminal window. In case this zsh version is ok for you, you’re done now!

Determine on which Linux distribution your system is based on. See List of Linux distributions – Wikipedia for a list. Most Linux systems – including Ubuntu – are Debian-based.

Debian-based linux systems

Open a terminal window. Copy & paste the following into the terminal window and hit Return . You may be prompted to enter your password.

You can use zsh now.

Red Hat-based linux systems

Open a terminal. Copy & paste the following into the terminal window and hit Return . You may be prompted to enter your password.

Suse-based linux systems

Open a terminal. Copy & paste the following into the terminal window and hit Return . You may be prompted to enter your password.

You can use zsh now.

OS X comes preloaded with zsh. You can check its version by writing zsh —version in a terminal window. In case this zsh version is ok for you, you’re done now!

If you want the latest and greatest, use Homebrew: Proceed with the following steps to install a recent version.

Homebrew [. ] simplifies the installation of software on the Mac OS X operating system.

Copy & paste the following into the terminal window and hit Return .

You will be requested to install the Command Line Developer Tools from Apple. Confirm by clicking Install. After the installation finished, continue installing Homebrew by hitting Return again.

Step 2 – Install zsh

Copy & paste the following into the terminal window and hit Return .

You can use zsh now.

Optional step 3 – default shell

To set zsh as your default shell, execute the following.

This comment has been minimized.

Copy link Quote reply

neo commented Nov 16, 2016

Windows 10 now has bash which makes the it easier.

This comment has been minimized.

Copy link Quote reply

elliott-beach commented Jan 26, 2017 •

Tried the OSX install script and got an error:
ruby -e «$(curl -fsSL https://raw.zshhubusercontent.com/Homebrew/install/master/install)»

curl: (6) Could not resolve host: raw.zshhubusercontent.com

This comment has been minimized.

Copy link Quote reply

yuseferi commented Jan 28, 2017

curl: (6) Could not resolve host: raw.zshhubusercontent.com

This comment has been minimized.

Copy link Quote reply

yuseferi commented Jan 28, 2017

@e-beach

brew install zsh
then
sudo -s ‘echo /usr/local/bin/zsh >> /etc/shells’ && chsh -s /usr/local/bin/zsh

Worked for me
Now I have zsh 🙂

This comment has been minimized.

Copy link Quote reply

vjyanand commented Jan 29, 2017

use /usr/bin/ruby -e «$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)» instead.

This comment has been minimized.

Copy link Quote reply

ilhamdoanggg commented Apr 29, 2017

i was installed a git bash on windows and can i change git bash with zsh themes?

This comment has been minimized.

Copy link Quote reply

rueTH commented May 15, 2017

@e-beach @zhilevan
I encountered that very same issue! For me, it was quickly resolved, though:
Prior to pasting the above into the terminal, I had used:
/usr/bin/ruby -e «$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)»
— meaning I had installed Homebrew according to the instructions on their actual site. It appears that version and the version instructed above are just two different roads leading to the same destination. As was the case for me, there’s a chance you may already have a version of Homebrew installed.
I have only been diving into the dev game since the start of the year (and until today was only familiar setting things up on PC/Linux), so rather than potentially leading you astray, I suggest you check out https://brew.sh/ for guidance on all things Homebrew.

Or, if you are the reckless or impatient sort, you can do what I did and press on by entering brew doctor into the terminal. If you have Homebrew already, it should be immediately evident. Boom.

**ATTN: I am no seasoned vet, and I hope those more knowledgable will correct any misinformation I have supplied & elaborate on the rest!

Источник

Dmitriy Azarov

В этом руководстве я постараюсь собрать все необходимое, по шагам с минимум необходимых действий. Вот что получится в итоге.

Для начала скачаем и установим альтернативу стандартному терминалу, а именно iTerm2.

По умолчанию в Mac OS установлена оболочка zsh. Это альтернатива оболчки shell по умолчанию. Следующий шаг это установка Oh My Zsh. Oh-My-Zsh это open source фреймворк, который поддерживается сообществом. Предназначен для управления настройками ZSH. Поставляется с большим количеством дополнительных функций, плагинов и тем. Для установки выполняем команду в консоли:

Далее проделаем шаги, чтобы получить консоль как на скриншоте выше.

Шрифты

Устанавливаем дополнительные шрифты (Powerline Fonts). Скачиваем и выполняем install.sh

Цвета

Скачиваем тему Solarized Dark для iTerm2. Заходим в настройки iTerm2 ( Profiles > Colors > Import. ). Импортируем тему и выбираем ее из списка.

В соседней вкладке выбираем шрифты. Я выбрал Meslo .

Меняем тему в файле настроек Oh My Zsh. Выполняем команду на открытие этого файла.

Заменяем тему и добавляем настройку DEFAULT_USER (чтобы в консоле не было user@machine).

Источник

How to install ZSH on your Mac

This short tutorial is meant for the beginning developers who are learning what terminal is and how to use it in the process of apps development.
— scroll down to find “Step by step instructions” of ZSH installation.

Let’s start with the terminology. By default, Bash shell is used in your terminal. Shell named ZSH is an alternative shell for your terminal.

The shell is a command line interface you interact with. Examples of shells are BASH, CSH, and ZSH. The shell takes hand-typed commands and tells the operating system to execute them. Learn more about terminal, shells, and console here.

ZSH is a good option if you are a developer 🙂 Since it’s powered with features like autocompletion, better UX, simple Git management and a lot more other features.

Step by step instructions on installing ZSH

  1. Open terminal.app
    note: find it in your spotlight or search field of your finder.
  2. Install homebrew (package management software that simplifies the installation). To do that, copy the following command:

and paste it into your terminal and press the return key. Then it will ask you to type the password of your Mac’s user account. After typing the password, press the return key. Important note: don’t worry if you don’t see the entered password while typing, the terminal hides it for security reasons.

Then wait until you see the successful message about installation.

note: You’ll find homebrew useful for installing a lot of tools for development.

3. Install ZSH by running (copy > paste > press return key) this command in the terminal:

Wait till you see the success message.

4. Install Oh My Zsh on top of zsh to get additional functionality:

5. Switch your shell from Bash to ZSH by running:

6. Restart terminal by quitting it and turning it back on. You should see zsh word in the top bar of the terminal app:

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

  • Install spark mac os x
  • Install rvm mac os
  • Install postgresql mac os
  • Install pecl mac os
  • Install mac port mac os