Automated Zsh Environment Setup Script

This script automates the installation and configuration of ZSH, including plugins, fonts, and the Starship prompt. It is designed for systems using APT or DNF package managers.

Views1
PublishedJan 14, 2026

Loading actions...

5 minBeginnerpromptSingle file

Skill content

Main instructions and any bundled files for this skill.

markdown

Automated Zsh Environment Setup Script

Overview

This script automates the installation and configuration of ZSH, including plugins, fonts, and the Starship prompt. It is designed for systems using APT or DNF package managers.

exampleImage

Features

  1. Installs and sets up ZSH as the default shell.
  2. Configures ZSH plugins:
    • zsh-autosuggestions
    • zsh-syntax-highlighting
  3. Adds FiraCode and Hermit font for better terminal visuals.
  4. Installs and configures the Starship prompt with predefined configuration files.

Requirements

  • Compatible Linux distribution with either:
    • APT (e.g., Ubuntu, Debian)
    • DNF (e.g., Fedora, RHEL)

Install

1. Download & execute the script using the commands below:
git clone https://gitlab.com/TariqJenkins/Better_Terminal.git ~/Better_Terminal
cd ~/Better_Terminal
bash zshInstall.sh
2. Post-Execution Steps
  • Change the terminal font to FiraCode or Hermit for optimal appearance.
    • In your terminal settings, go to Font Preferences and select 'FiraCode' or 'Hermit'.
  • Apply the changes by logging out and then signing in again.

Details of the Script

Components

  • Dependencies: Installs zsh, wget, and tar if its not already installed.
  • ZSH Configuration:
    • Moves any existing .zshrc to .zshrc.old for backup.
    • Copies a new preconfigured .zshrc configuration file.

Plugins:

  • Adds zsh-syntax-highlighting and zsh-autosuggestions plugins to /usr/share/ directory.

FiraCode & Hermit Font:

  • Copies FiraCode and Hermit fonts to the user’s ~/.fonts directory.

Starship Prompt:

  • Installs Starship and applies custom configurations.
  • The Starship theme can be changed by editing the .zshrc file.
nano ~/.zshrc
  • Change the line below.
export STARSHIP_CONFIG="$HOME/.config/starship1.toml"
  • Available options for Starship theming.
export STARSHIP_CONFIG="$HOME/.config/starship1.toml" ## Default

starship

export STARSHIP_CONFIG="$HOME/.config/starship2.toml"

starship

export STARSHIP_CONFIG="$HOME/.config/starship3.toml" 

starship

export STARSHIP_CONFIG="$HOME/.config/starship4.toml" 

starship

Functions

  • zsh_Install: Installs ZSH and its dependencies.
  • zsh_Plugins: Configures plugins for ZSH.
  • nerd_Fonts: Adds FiraCode and hermit fonts (You will need to manually set FiraCode or Hermit as your terminal font).
  • starship_Install: Installs and configures Starship.

License

This script is open-source and can be modified or distributed under the terms of the MIT License.

Disclaimer

Use this script at your own risk. Ensure you understand the changes it makes to your system. Always back up important configurations before running automation scripts.

Share: