Skip to content

Installation

Pascal Zarrad edited this page Mar 26, 2024 · 18 revisions

As psh was initially build as a simple install script for zsh, the focus lays on an easy installation process - while still being powerfull enough to generate huge and personalized .zshrc's. While the installation process is straight forward. You can run the script in an unattended mode when using a specific parameter. You can also specify a specific user for which psh will be installed when running the script as root. If you run the script as root, specify a specific user and use --unattended, you can use psh in an automated install script.

Please check the compatibility of your operating system before trying to install psh.

Quick install

The quick install is a great choice with you don't have many time for the installation. Just check if your system is compatible with psh and run the below command. If you have an fork of psh, replace the GitHub repository URL with the one of your repository!

This quick install command is only compatible with Debian based systems (supporting apt).

Short explaination what the following command does:

  • It is not just one command, its seven commands chained together!
  • It will update the package database apt update.
  • It will install git.
  • It will clone this repository.
  • It will change into the directory that has been created while cloning this repository.
  • It will make the install.sh script executable
  • It will execute the install.sh script
  • The installer will guide you through the standard installation process

Copy this command and execute it to quickly install psh:

sudo apt update && sudo apt install git && git clone https://github.com/pascal-zarrad/psh.git && cd psh && chmod +x install.sh && ./install.sh

If you want further information about the installation, read the full guide.

Normal installation

The normal installation process is using the same commands as the quick install, but with further explaination.

Install git

The recommended way to download psh is git. This allows you to update your local psh source with a single command.

Git should be known to the most software developers and Linux users out there, if not check this link.

Please install git according to the official git documentation.

Clone this repo

Now clone this repository to collect all required installation files.

git clone https://github.com/pascal-zarrad/psh.git

Cloning the repository will download all files of the project that you need to use psh.

Go into the created folder

After cloning psh, you will find a psh folder. Switch your current working directory to it.

cd psh

From here you are able to customize psh. You can create custom user templates to load zshrc-snippets, or create entire plugins with a more complex logic, to generate content for your .zshrc.

Make the installer executable

Usually, after cloning the repository, the installer script is not executable. You have to make it executable by using chmod.

chmod +x install.sh

Finally, install

Now execute the install script. The instalation script will guide you through the installation. Prepare your sudo password and agree that you want to configure zsh using psh.

./install.sh

In conclusion, this is the entire installation of psh. If you accepted, that zsh should be set as your default shell, it will be used after you re-login.

If you want to manually switch to zsh, simply use the zsh command from your current shell.

Available arguments

The following arguments can be passed to the install.sh:

Argument Function
--help Print a list with all available arguments
--disable-templates Disable the template engine during installation
--disable-plugins Disable the plugin system during installation
--unattended Run an installation without any yes/no dialogs.

Updating

Please refer to updating, if you want to update psh.