---
# System prepended metadata

title: 'Day 2: Cài đặt terminal'

---

---
title: "Day 2: Cài đặt terminal"
description: ""
lead: ""
date: 2023-05-27
lastmod: 2023-05-27
draft: false
images: []
contributors: ["lelouvincx"]
weight:
---

# Day 2: Cài đặt terminal

## Alacritty

### Các packages liên quan

```bash
sudo apt install cmake pkg-config libfreetype6-dev libfontconfig1-dev libxcb-xfixes0-dev libxkbcommon-dev python3 git-core -y
```

### Cài đặt rust

```bash
sudo curl https://sh.rustup.rs -sSf | sh
```

```bash
rustup override set stable
rustup update stable
```

### Download alacritty's source code

```bash
git clone https://github.com/alacritty/alacritty.git .alacritty
```

### Install alacritty

```bash
cd .alacritty
```

```bash
cargo build --release
```

```bash
sudo tic -xe alacritty,alacritty-direct extra/alacritty.info
infocmp alacritty
```

### Create desktop shortcut

```bash
sudo cp target/release/alacritty /usr/local/bin # or anywhere else in $PATH
sudo cp extra/logo/alacritty-term.svg /usr/share/pixmaps/Alacritty.svg
sudo desktop-file-install extra/linux/Alacritty.desktop
sudo update-desktop-database
```

### Manual page

```bash
sudo mkdir -p /usr/local/share/man/man1
scdoc < extra/man/alacritty.1.scd | gzip -c | sudo tee /usr/local/share/man/man1/alacritty.1.gz > /dev/null
scdoc < extra/man/alacritty-msg.1.scd | gzip -c | sudo tee /usr/local/share/man/man1/alacritty-msg.1.gz > /dev/null
```

### Run alacritty

```bash
sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator /usr/bin/alacritty 50
sudo update-alternatives --config x-terminal-emulator
```

### Customization

### Update alacritty

### Uninstall alacritty

## Zsh

### Install zsh

```bash
sudo apt-get update
sudo apt-get install zsh -y
```

```bash
which zsh
```

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

### Alacritty shell completions

```bash
mkdir -p ${ZDOTDIR:-~}/.zsh_functions
echo 'fpath+=${ZDOTDIR:-~}/.zsh_functions' >> ${ZDOTDIR:-~}/.zshrc
```

```bash
cp extra/completions/_alacritty ${ZDOTDIR:-~}/.zsh_functions/_alacritty
```

### Install zimfw

Uninstall oh-my-zsh (if exists)
```bash
source ~/.oh-my-zsh/tools/uninstall.sh
```

```bash
curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
# Or using wget
wget -nv -O - https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
```

**Remove comp init:**

### Customize themes

### Additional zimfw modules