Files
thpeetz-notes/Infos/IT/Termux.md
T
2026-01-30 18:42:37 +01:00

1.6 KiB

tags
tags
IT/Tools/termux
IT/Tools/Shell

Installation

To set up Oh My Zsh in Termux, follow these steps:

Install required packages:

pkg install zsh git curl wget

Install Oh My Zsh using the official installer:

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

Set Zsh as the default shell:

chsh -s zsh

Restart Termux for changes to take effect. Recommended Enhancements: Use a modern theme like Powerlevel10k:

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

Then, in ~/.zshrc, set:

ZSH_THEME="powerlevel10k/powerlevel10k"

Install Powerline fonts for proper icons (optional but recommended):

pkg install fontconfig
mkdir -p ~/.termux/font
cd ~/.termux/font
curl -sSLO https://github.com/powerline/fonts/raw/master/SourceCodePro/Source%20Code%20Pro%20for%20Powerline.otf
cd -
termux-reload-settings

Enable useful plugins (e.g., zsh-autosuggestions, zsh-syntax-highlighting):

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

Add plugins to ~/.zshrc: plugins=(git zsh-autosuggestions zsh-syntax-highlighting)

Reload configuration:

source ~/.zshrc

For a complete setup, consider using scripts like adi1090x/termux-omz or Sohil876/Termux-zsh for automated installation of Zsh, Oh My Zsh, Powerlevel10k, and additional tools.