Zsh: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Die Seite wurde neu angelegt: „= Installation = == Debian == * '''apt install zsh'''“ |
|||
| (Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
= ZSH unter Debian wie in Kali Linux = | |||
*Diese Anleitung richtet die Z-Shell (ZSH) unter Debian genauso ein wie in Kali Linux – mit Oh-My-ZSH, dem Kali-Theme, Syntax-Highlighting, Auto-Vervollständigung und den typischen Aliassen.* | |||
= Installation = | = Installation = | ||
== Debian == | *apt install zsh git curl zsh-syntax-highlighting zsh-autosuggestions -y | ||
* ''' | *sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | ||
*chsh -s /bin/zsh $USER | |||
= Konfiguration = | |||
*cp ~/.zshrc ~/.zshrc.backup | |||
*nano ~/.zshrc | |||
<pre> | |||
# ~/.zshrc – Kali-ähnliche Konfiguration für Debian | |||
# Pfad zu Oh-My-ZSH | |||
export ZSH="$HOME/.oh-my-zsh" | |||
# Theme (Kali-Standard) | |||
ZSH_THEME="kali" | |||
# Plugins aktivieren | |||
plugins=( | |||
git | |||
command-not-found | |||
colored-man-pages | |||
compleat | |||
history | |||
z | |||
) | |||
# Oh-My-ZSH laden | |||
source $ZSH/oh-my-zsh.sh | |||
# Farben aktivieren | |||
autoload -U colors && colors | |||
# Standardeditor | |||
export EDITOR='nano' | |||
# Autovervollständigung | |||
autoload -Uz compinit && compinit | |||
# Syntax Highlighting | |||
if [ -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then | |||
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | |||
fi | |||
# Autosuggestions | |||
if [ -f /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then | |||
source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh | |||
fi | |||
# Aliase | |||
alias ll='ls -alF --color=auto' | |||
alias la='ls -A --color=auto' | |||
alias l='ls -CF --color=auto' | |||
alias grep='grep --color=auto' | |||
alias egrep='egrep --color=auto' | |||
alias fgrep='fgrep --color=auto' | |||
alias ip4='ip -4 addr show' | |||
alias ip6='ip -6 addr show' | |||
# SSH-Farbfix | |||
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then | |||
export TERM=xterm-256color | |||
fi | |||
# History | |||
HISTSIZE=5000 | |||
SAVEHIST=5000 | |||
HISTFILE=~/.zsh_history | |||
# PATH | |||
export PATH=$HOME/bin:/usr/local/bin:$PATH | |||
# Prompt (Kali-Stil) | |||
PROMPT='%F{cyan}%n%f@%F{yellow}%m%f:%F{green}%~%f$ ' | |||
# Git-Info im Prompt | |||
autoload -Uz vcs_info | |||
precmd() { vcs_info } | |||
zstyle ':vcs_info:git:*' formats '(%b)' | |||
#RPROMPT='${vcs_info_msg_0_}' | |||
</pre> | |||
= ZSH starten = | |||
*exec zsh | |||
= Zusammenfassung = | |||
:*ZSH unter Debian entspricht jetzt der Kali-Vorkonfiguration. | |||
:*Oh-My-ZSH liefert Framework, Theme und Plugins. | |||
:*Syntax-Highlighting und Autosuggestions verbessern Lesbarkeit. | |||
:*Aliase und Farben identisch zu Kali Linux. | |||
Aktuelle Version vom 12. November 2025, 09:14 Uhr
ZSH unter Debian wie in Kali Linux
- Diese Anleitung richtet die Z-Shell (ZSH) unter Debian genauso ein wie in Kali Linux – mit Oh-My-ZSH, dem Kali-Theme, Syntax-Highlighting, Auto-Vervollständigung und den typischen Aliassen.*
Installation
- apt install zsh git curl zsh-syntax-highlighting zsh-autosuggestions -y
- sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- chsh -s /bin/zsh $USER
Konfiguration
- cp ~/.zshrc ~/.zshrc.backup
- nano ~/.zshrc
# ~/.zshrc – Kali-ähnliche Konfiguration für Debian
# Pfad zu Oh-My-ZSH
export ZSH="$HOME/.oh-my-zsh"
# Theme (Kali-Standard)
ZSH_THEME="kali"
# Plugins aktivieren
plugins=(
git
command-not-found
colored-man-pages
compleat
history
z
)
# Oh-My-ZSH laden
source $ZSH/oh-my-zsh.sh
# Farben aktivieren
autoload -U colors && colors
# Standardeditor
export EDITOR='nano'
# Autovervollständigung
autoload -Uz compinit && compinit
# Syntax Highlighting
if [ -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
fi
# Autosuggestions
if [ -f /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then
source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
fi
# Aliase
alias ll='ls -alF --color=auto'
alias la='ls -A --color=auto'
alias l='ls -CF --color=auto'
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias ip4='ip -4 addr show'
alias ip6='ip -6 addr show'
# SSH-Farbfix
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
export TERM=xterm-256color
fi
# History
HISTSIZE=5000
SAVEHIST=5000
HISTFILE=~/.zsh_history
# PATH
export PATH=$HOME/bin:/usr/local/bin:$PATH
# Prompt (Kali-Stil)
PROMPT='%F{cyan}%n%f@%F{yellow}%m%f:%F{green}%~%f$ '
# Git-Info im Prompt
autoload -Uz vcs_info
precmd() { vcs_info }
zstyle ':vcs_info:git:*' formats '(%b)'
#RPROMPT='${vcs_info_msg_0_}'
ZSH starten
- exec zsh
Zusammenfassung
- ZSH unter Debian entspricht jetzt der Kali-Vorkonfiguration.
- Oh-My-ZSH liefert Framework, Theme und Plugins.
- Syntax-Highlighting und Autosuggestions verbessern Lesbarkeit.
- Aliase und Farben identisch zu Kali Linux.