> For the complete documentation index, see [llms.txt](https://docs.netsgo.no/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.netsgo.no/netsgo/linux-server-setup/terminal-customization.md).

# Terminal customization

### Installing ZSH (Z Shell)

{% hint style="info" %}
**Source:** [Github wiki for zsh installation](https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH)
{% endhint %}

ZSH or Z Shell comes with many useful pre-configurations and features. You default shell is most likely bash. To install ZSH simply run the install command

```bash
sudo apt install zsh
```

Check if ZSH was successfully installed by checking its version

```bash
zsh --version
```

Change your shell from your default to ZSH. Make sure to relog for it to take effect. On your first login with ZSH you'll be presented with few options, choose the full config option by pressing `2`

```bash
chsh -s $(which zsh)
```

&#x20;Double check if your current shell is in fact ZSH

```bash
echo $SHELL
```

### Installing oh my ZSH

{% hint style="info" %}
**Source:** [Github wiki for oh my zsh installation](https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH)
{% endhint %}

Oh My ZSH comes with even more features and provides countless plugins and themes for your terminal. To install it simply run the install command

```
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
```

### Installing agnoster theme

{% hint style="info" %}
**Source:** [Github repository for agnoster theme](https://github.com/agnoster/agnoster-zsh-theme)
{% endhint %}

Oh My ZSH already comes with agnoster theme pre-installed, however you'll need to install a patched powerline font on to your system and configure your terminal to use it. Patched fonts provide icons and nice formatting for your terminal. [Roboto patched font download](https://github.com/powerline/fonts/blob/master/RobotoMono/Roboto%20Mono%20for%20Powerline.ttf)&#x20;

To change your terminal theme to agnoster you'll have to edit the `.zshrc` config. Find `ZSH_THEME` and change it to `agnoster`

```bash
vim ~/.zshrc
```

To change the looks of agnoster theme simply edit theme file

```bash
vim ~/.oh-my-zsh/themes/agnoster.zsh-theme
```

To change color of current directory background simply change yellow to whatever color you want.&#x20;

```bash
# Dir: current working directory
prompt_dir() {
  prompt_segment yellow $CURRENT_FG '%~'
}
```

Here's an example of how yellow color looks like:

![Windows Terminal with agnoster theme](https://2089604751-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MUP1pIK1DWWcppc2hAz%2F-MUj0zs-K3ai1_1AKoU3%2F-MUj150kDuKe7XC7Vt22%2Fterminal.png?alt=media\&token=05b9b7c7-143e-4bdc-8157-0a9b4d249dea)
