Skip to content

Arch Linux Shell Configuration

Mattscreative edited this page Dec 5, 2025 · 2 revisions

Arch Linux Shell Configuration Guide

Complete beginner-friendly guide to shell configuration on Arch Linux, including Bash, Zsh, Fish, and shell customization.


Table of Contents

  1. Bash Configuration
  2. Zsh Configuration
  3. Fish Configuration
  4. Shell Customization
  5. Troubleshooting

Bash Configuration

Install Bash

Bash is default:

# Check version
bash --version

# Usually pre-installed

Configure Bash

Edit bashrc:

# Edit bashrc
vim ~/.bashrc

# Or bash_profile
vim ~/.bash_profile

Common settings:

# Aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

# Prompt
PS1='[\u@\h \W]\$ '

# History
HISTSIZE=1000
HISTFILESIZE=2000

Zsh Configuration

Install Zsh

Install Zsh:

# Install Zsh
sudo pacman -S zsh

# Change shell
chsh -s /bin/zsh

oh-my-zsh

Install oh-my-zsh:

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

# Configure
vim ~/.zshrc

Zsh Plugins

Install plugins:

# Edit zshrc
vim ~/.zshrc

# Add plugins
plugins=(git docker kubectl)

Fish Configuration

Install Fish

Install Fish:

# Install Fish
sudo pacman -S fish

# Change shell
chsh -s /bin/fish

Fish Configuration

Configure Fish:

# Create config
mkdir -p ~/.config/fish
vim ~/.config/fish/config.fish

Shell Customization

Prompt Customization

Bash prompt:

# Edit bashrc
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

Zsh prompt:

# Use oh-my-zsh themes
# Edit ~/.zshrc
ZSH_THEME="robbyrussell"

Aliases

Create aliases:

# Add to shell config
alias update='sudo pacman -Syu'
alias clean='sudo pacman -Sc'
alias orphans='sudo pacman -Rns $(pacman -Qdtq)'

Troubleshooting

Shell Not Changing

Check shell:

# Check current shell
echo $SHELL

# Change shell
chsh -s /bin/zsh

# Log out and back in

Summary

This guide covered Bash, Zsh, Fish configuration, and shell customization.


Next Steps


This guide is based on the ArchWiki. For the most up-to-date information, always refer to the official ArchWiki.

Clone this wiki locally