A terminal emulator is a text-only application that emulates a console in a desktop environment. Basically, it is a GUI program that acts as a wrapper or front-end and allows you to run a shell and enter Command ⌘s that the operating system can interpret and execute.
And just as any other program or application, you can install, uninstall, and customize different terminals. There are many great terminals out there such as iTerm, Alacrity, Windows Terminal, Hyper.is, Kitty, guake, and gnome-terminal.
A shell is a command-line interpreter. It sits between the kernel (core) of an operating system and the user, and exposes the operating system’s services to a human user or other programs. In other words, a shell is a command-line user interface for accessing the services of the operating system. Some example of shells are: Power Shell, cmd, Bash, fish, and Zsh.
Windows terminal is a modern host application for command-line tools and shells, like Command Prompt, PowerShell, zsh & bash (via WSL), and more. It’s very powerful and offers a lot of customization and productivity features like tabs, themes, customized color schemes, shortcuts, and much more.
To open the Windows Terminal, press the Windows + X keys simultaneously on the keyboard. In the WinX menu, select the Windows Terminal option.
Install Windows Subsystem for Linux (WSL). By using WSL2, you can run a genuine Linux kernel alongside Windows. Press Win + X, then choose Windows PowerShell (Admin): wsl ‐‐install to download and install WSL2 from Microsoft’s repositories. This command will enable the features necessary to run WSL and install the Ubuntu distribution of Linux. You will be prompted to enter a new UNIX password, confirm that password, and then close WSL using the exit command.
# Verify that it works
PS C:\Users\Owner> wsl -l -v
NAME STATE VERSION
* Ubuntu Running 2
docker-desktop Stopped 2
To make Windows Terminal able to render fancy icons, install NERD-FONTS. Download a font (FiraCode, Cascadia, or JetBrainsMono recommended) extract and install all .ttf/.otf files (right-click and Install, Windows will copy the fonts into C:\Windows\Fonts\). Configure in Windows Terminal Settings:
"profiles": {
"defaults": {
// Use your chosen Nerd Font here
"fontFace": "FiraCode Nerd Font",
"fontSize": 12
}
}
Install Zsh, Neovim, and Oh My Zsh in WSL. Launch your Ubuntu WSL. Open Windows Terminal, click the down arrow (▼), and select Ubuntu.
# Update your package lists and upgrade
sudo apt-get update && sudo apt-get upgrade
# Install essential packages: zsh: Z shell;neovim: Modern Vim-compatible editor;
# git: Version control; curl: For remote downloads;net-tools: Provides utilities like ifconfig
sudo apt install zsh neovim git net-tools -y
# Install Oh My Zsh (community-maintained framework for Zsh):
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
When prompted Do you want to change your default shell to zsh? [Y/n], type Y, and press Enter to set zsh as the default shell.
# Ensure Zsh is now your default shell
chsh -s $(which zsh)
# Then, close (`exit`) and reopen WSL (start a new Ubuntu tab in Windows Terminal).
# Verify that Zsh is your current shell.
➜ ~ echo $SHELL
/usr/bin/zsh
Configure Windows Terminal JSON for Productivity, e.g., change Windows Terminal Settings to use Nerd-Fonts (“fontFace”: “DroidSansMono Nerd Font”). Click on Settings in the Windows Terminal menu, Open JSON file.
Alternatively, you can also access the Open Settings file (JSON) through the Command Palette (Ctrl+Shift+P).
...
{
// Documentation: https://aka.ms/terminal-documentation
"$help": "https://aka.ms/terminal-documentation",
// Schema reference: https://aka.ms/terminal-profiles-schema
"$schema": "https://aka.ms/terminal-profiles-schema",
// ⌨️ Actions (custom keybindings)
"actions": [
{
// Copy selected text (multi-line enabled)
"command": {
"action": "copy",
"singleLine": false
},
"id": "User.copy.644BA8F2"
},
{
// Paste clipboard content into terminal
"command": "paste",
"id": "User.paste"
},
{
// Open search dialog (Ctrl+Shift+F)
"command": "find",
"id": "User.find"
},
{
// Split pane with duplicate profile
"command": {
"action": "splitPane",
"split": "auto",
"splitMode": "duplicate"
},
"id": "User.splitPane.A6751878"
}
],
// When copying text, do not include rich text formatting:
"copyFormatting": "none",
// Automatically copy selected text to clipboard
"copyOnSelect": true,
// Default shell profile (Ubuntu)
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
// Global keyboard shortcuts
"keybindings": [
{
// Ctrl+C - Copy selected text
"id": "User.copy.644BA8F2",
"keys": "ctrl+c"
},
{
// Ctrl+V - Paste from clipboard
"id": "User.paste",
"keys": "ctrl+v"
},
{
// Ctrl+Shift+F - Open find/search bar
"id": "User.find",
"keys": "ctrl+shift+f"
},
{
// ➗ Alt+Shift+D - Split current pane (duplicate)
"id": "User.splitPane.A6751878",
"keys": "alt+shift+d"
},
{
// ❌ Win+Shift+Q - Close current tab (or window if last tab)
"command": { "action": "closeWindow" },
"keys": "win+shift+q"
}
],
// Customize new tab menu (Show any profiles not specifically pinned)
"newTabMenu": [
{
"type": "remainingProfiles"
}
],
// Shell Profiles configuration
"profiles": {
"defaults": {
// Visual effects: Acrylic blur with opacity
"acrylicOpacity": 75,
"useAcrylic": true,
// Default color scheme
"colorScheme": "Dracula",
// Always use full box cursor
"cursorShape": "filledBox",
// Internal padding: top, right, bottom, left (in pixels)
"padding": "10, 5, 10, 10",
// Default font for all profiles unless overridden
"font": {
"face": "FiraCode Nerd Font Mono",
"fontSize": 12
}
},
"list": [
{
// Windows PowerShell profile
"commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"hidden": false,
// Change the staring directory
"startingDirectory": "%USERPROFILE%/Documents/",
"name": "Windows PowerShell"
},
{
// Command Prompt (CMD) profile
"commandline": "%SystemRoot%\\System32\\cmd.exe",
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"hidden": false,
"name": "Command Prompt"
},
{
// Ubuntu WSL profile
"guid": "{0665c6cd-cc97-5120-8596-6247c5b3edd3}",
"hidden": false,
"name": "Ubuntu",
"colorScheme": "Tango Dark",
"useAcrylic": true,
"acrylicOpacity": 0.9,
"source": "Microsoft.WSL",
"fontFace": "FiraCode Nerd Font"
}
]
},
// Color Schemes
"schemes": [
{
"name": "Dracula",
"background": "#1e1f29",
"black": "#21222c",
"blue": "#bd93f9",
"brightBlack": "#6272a4",
"brightBlue": "#d6acff",
"brightCyan": "#a4ffff",
"brightGreen": "#69ff94",
"brightPurple": "#ff92df",
"brightRed": "#ff6e6e",
"brightWhite": "#ffffff",
"brightYellow": "#ffffa5",
"cyan": "#8be9fd",
"foreground": "#f8f8f2",
"green": "#50fa7b",
"purple": "#ff79c6",
"red": "#ff5555",
"white": "#f8f8f2",
"yellow": "#f1fa8c"
}
],
// Themes (optional): You can define light/dark mode switching here
"themes": []
}
}
Essential Zsh Plugins. Once you have Oh My Zsh installed, it’s time to add a few plugins that dramatically improve your command-line experience.
# Install plugins
# zsh-autosuggestions is a fish-like fast and unobtrusive autosuggestions for zsh, a real time saver!
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# zsh-syntax-highlighting provides syntax highlighting for the shell zsh.
git clone https://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# Zsh-z is a command-line tool that allows you to jump quickly to directories that you have visited frequently or recently
git clone https://github.com/agkozak/zsh-z ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-z
# Enable these plugins in your ~/.zshrc
plugins=(git zsh-autosuggestions zsh-syntax-highlighting z)
# Save and quit. Then reload Zsh:
source ~/.zshrc
Ensure Docker Desktop is running on Windows. Launch Docker Desktop. Go to Settings, General and make sure Use WSL 2 based engine is checked. Go to Settings, Resources, WSL Integration. Enable integration for your desired Linux distributions (e.g., Ubuntu). Check the box next to each WSL distro you want Docker to support. Click Apply & Restart if you make changes.
To resize the text, hold down the Ctrl key, then press + (plus) or – (minus) to increase or decrease font size. Alternatively, click the drop-down menu next to the New tab (+) button, select Settings, Defaults from the left pane, Appearance, Font Size. Then, change the font size as needed.
The Windows Terminal supports opening multiple tabs and splitting the terminal into multiple panes for better productivity and multitasking. To split the terminal into two panes, press Alt, Shift, and d (automatically split the current pane optimally), Alt, Shift, and + (split vertically), Alt, Shift, and - (split horizontally). To move focus between panes, press Alt + arrow keys. Ctrl, Shift, and w close innermost pane, tab, or window.
To open a hyperlink with your mouse, use Ctrl + click. Alt + Enter/F11 toggle full-screen mode on/off. Alt + F4 close the current window (all tabs).
Install Docker Desktop & Ollama. Download Docker Desktop for Windows. Run the installer, ensure WSL 2 backend is selected. At the end, check Enable WSL integration for your Ubuntu distribution. Test Docker in WSL: Launch the Ubuntu profile in Windows Terminal and run docker run hello-world. You should see a “Hello from Docker!” message, confirming Docker can pull and run containers from within WSL.
# Install Ollama in WSL. In your Ubuntu WSL terminal, run:
curl -fsSL https://ollama.com/install.sh | sh
# Verify the installation of Ollama.
➜ ~ ollama -v
ollama version is 0.9.0
# Add/pull a model
ollama pull deepseek-v3:671b
# Run a model interactively
ollama run deepseek-v3:671b
# Remove a model
ollama rm deepseek-v3:671b
➜ ~ ollama run deepseek-r1:70b
success
>>> what are the most important commands in Ollama (large language models)
Thinking...
Okay, so I'm trying to figure out what the most important commands are when using Ollama, which is a large language model. [...]
1. **Set the Tone/Style**: Guides the response tone, such as formal or friendly.
2. **Specify Format**: Requests responses in bullet points, steps, etc., for clarity.
3. **Provide Context**: Tailors answers by including background information.
4. **Ask for Examples**: Clarifies concepts with concrete instances.
5. **Clarify/Elaborate**: Seeks more detailed explanations when needed.
6. **Summarize Information**: Condenses responses into key points [...]
>>> /?
Available Commands:
/set Set session variables
/show Show model information
/load Load a session or model
/save Save your current session
/clear Clear session context
/bye Exit
/?, /help Help for a command
/? shortcuts Help for keyboard shortcuts
Use """ to begin a multi-line message.
>>> /bye
ifconfig
[...]
inet 172.22.110.143 netmask 255.255.240.0 broadcast 172.22.111.255
# Edit the Ollama service file
sudo vim /etc/systemd/system/ollama.service
[...]
# By default, Ollama binds to 127.0.0.1:11434 (loopback) inside WSL, which means you can only access it from within WSL itself.
# If you want to reach Ollama from Windows or any other device on your LAN, you must reconfigure Ollama to listen on 0.0.0.0:11434
# To make Ollama listen on all available network interfaces within WSL
Environment="OLLAMA_HOST=0.0.0.0:11434"
# Reload systemd and restart Ollama
sudo systemctl daemon-reload
sudo systemctl enable ollama.service
sudo systemctl restart ollama
# In Windows Subsystem for Linux (WSL), networkingMode=mirrored indicates a networking configuration where the WSL distribution directly accesses the network interfaces of the Windows host machine.
# To enable this mode, users must create or modify the .wslconfig file. This file is not present by default and must be placed in the user's %UserProfile% directory on the Windows side (e.g., C:\Users\Owner\.wslconfig).
[wsl2]
networkingMode=mirrored
# WSL must be completely shut down
wsl --shutdown
# You can restart by launching your Linux distribution.
# Allows inbound traffic through the Windows firewall for the WSL VM interface.
Set-NetFirewallHyperVVMSetting -Name '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}' -DefaultInboundAction Allow
# In Windows, open PowerShell or Command Prompt and run:
PS C:\Users\Owner\Documents> Invoke-WebRequest -Uri http://localhost:11434/api/generate -Method Post -Body '{"model":"llama3.2","prompt":"Hello"}' -ContentType 'application/json'
StatusCode : 200
StatusDescription : OK
Content : {123, 34, 109, 111...}
RawContent : HTTP/1.1 200 OK
Transfer-Encoding: chunked
{"model":"llama3.2","created_at":"2025-06-03T11:39:01.620488434Z","response":"Ho...
To completely remove Ollama from your Ubuntu setup running under WSL (Windows Subsystem for Linux), follow these instructions:
Ollama can’t run simultaneously on both native Ubuntu and WSL because it binds to a specific port (localhost:11434), and only one instance can occupy that at a time.+-
-0;897JH6G54\3er2w1`+
# Stop and disable the Ollama service
sudo systemctl stop ollama
sudo systemctl disable ollama
sudo rm /etc/systemd/system/ollama.service
# Remove the Ollama binary
sudo rm $(which ollama)
# Delete model files and configuration folders
sudo rm -r /usr/share/ollama
sudo rm -r ~/.ollama
# Delete group Ollama
sudo grou/pdel ollama
iTerm2 is a replacement for your macOS Terminal. It brings the terminal into the modern age. It's highly customizable and comes with a lot of useful features.
… each of which is a separate session.
An iTerm2 Cheatsheet
Ghostty is a fast, feature-rich, and cross-platform terminal emulator that uses platform-native UI and GPU acceleration.
brew install --cask ghostty.mkdir -p ~/dotfiles/macOS/ghostty/.config/ghostty.touch ~/dotfiles/macOS/ghostty/.config/ghostty/config.cd ~/dotfiles/macOS && stow -t ~ ghostty.# =============================================================================
# Ghostty config (macOS)
# Location : ~/.config/ghostty/config
# Validate : ghostty +validate-config
# Reference: ghostty +show-config --default --docs (every option, documented)
# Reload : Cmd + Shift + ,
# Recall: Ctrl → Control (⌃); Win → Command (⌘); Alt → Option (⌥)
# You can use Ghostty's modern built-in Command Palette instead. Press Cmd + Shift + P.
# Then, type reload.
# Note : if ~/Library/Application Support/com.mitchellh.ghostty/config
# exists, it takes precedence over this file. Delete it if the
# settings below seem to be ignored.
# =============================================================================
# -----------------------------------------------------------------------------
# THEME & COLORS
# -----------------------------------------------------------------------------
# Follows macOS appearance: Latte (light) by day, Mocha (dark) by night.
# Use a single name (theme = Catppuccin Mocha) to pin one theme.
# Browse all themes with a live preview: ghostty +list-themes
theme = Dracula+
# Window transparency: 1.0 = opaque, lower = more see-through.
background-opacity = 0.95
# Blurs whatever is behind the transparent window (macOS). Higher = blurrier.
background-blur-radius = 20
# -----------------------------------------------------------------------------
# FONTS (Nerd Font icons work out of the box)
# -----------------------------------------------------------------------------
# Primary font. Ghostty bundles JetBrains Mono AND a Nerd Font symbols
# fallback, so icons (starship, eza, lazygit, neovim, yazi) render without
# installing anything.
# font-family = JetBrains Mono
# Alternative: a patched Nerd Font. Install it first with
# brew install --cask font-jetbrains-mono-nerd-font
# then find the exact name with: ghostty +list-fonts | grep -i jetbrains
# The "Mono" variant keeps every icon inside a single cell (no overlap).
font-family = JetBrainsMono Nerd Font Mono
# Font size in points. Increase font size (⊞)/ Command (⌘) + "+".
# Decrease Font size ⌘ + " -" / ⌘ + 0 (reset).
font-size = 24
# Extra line spacing: +10% cell height makes text more readable.
adjust-cell-height = 10%
# -----------------------------------------------------------------------------
# CURSOR
# -----------------------------------------------------------------------------
# Shape: block, bar, underline, or block_hollow.
cursor-style = bar
# Disable blinking.
cursor-style-blink = false
# -----------------------------------------------------------------------------
# WINDOW, TABS & LAYOUT
# -----------------------------------------------------------------------------
# Inner padding (in points) between the window edge and the text.
window-padding-x = 10
window-padding-y = 8
# Spreads leftover pixels evenly so padding is symmetrical on all sides
# instead of leaving a gap only at the bottom/right.
window-padding-balance = true
# Hides the mouse pointer while you type; it reappears when you move it.
mouse-hide-while-typing = true
# Tabs live inside the titlebar (compact, native look). Alternatives:
# native, transparent, hidden.
macos-titlebar-style = tabs
# Restores windows, tabs and splits when you relaunch Ghostty.
window-save-state = always
# New windows/tabs/splits open in the directory of the current one.
# Requires shell integration (enabled below).
window-inherit-working-directory = true
# Ask for confirmation before closing a terminal that still has a running
# process (builds, SSH sessions, editors). Set to false to close silently.
confirm-close-surface = true
# Dims splits that are not focused (1.0 = no dimming) so you can see which
# one is active.
unfocused-split-opacity = 0.85
# -----------------------------------------------------------------------------
# FULLSCREEN
# -----------------------------------------------------------------------------
# Every new window starts fullscreen. Toggle manually with Cmd+Ctrl+F.
# Remove this line if you'd rather start windowed (or use `maximize = true`
# to only fill the screen without entering fullscreen mode).
# This starts Ghostty in macOS native fullscreen, which creates a separate macOS Space that
# my Window Manager (AeroSpace) can’t manage.
# fullscreen = true
# -----------------------------------------------------------------------------
# COPY & PASTE
# -----------------------------------------------------------------------------
# Basics: Cmd+C copy, Cmd+V paste, Cmd+A select all,
# double-click = word, triple-click = line, Cmd+click opens URLs/paths.
# Selecting text copies it to the system clipboard immediately (no need of Cmd+C).
copy-on-select = clipboard
# Strips trailing whitespace from copied lines.
clipboard-trim-trailing-spaces = true
# Warns before pasting text that looks dangerous (e.g. multi-line commands).
clipboard-paste-protection = true
# OSC 52: lets programs (tmux, neovim over SSH) write to your Mac clipboard.
# This is what makes remote yanking work.
clipboard-write = allow
# OSC 52: lets programs READ your clipboard. "ask" prompts you each time,
# which is safer than "allow".
clipboard-read = ask
# -----------------------------------------------------------------------------
# SCROLLBACK
# -----------------------------------------------------------------------------
# Scrollback buffer size in BYTES per terminal (25,000,000 = ~25 MB).
# Default is 10 MB. Search it with Cmd+F.
scrollback-limit = 25000000
# -----------------------------------------------------------------------------
# SHELL INTEGRATION
# -----------------------------------------------------------------------------
# Auto-detects bash, zsh, fish or elvish and injects integration.
# Enables prompt jumping (Cmd+Up/Down), working-directory tracking and
# smarter close confirmations.
shell-integration = detect
# Features:
# cursor - bar cursor at the prompt, restores shape in programs
# sudo - keeps your terminfo working under sudo
# title - sets the window title from the shell
# ssh-env - falls back to TERM=xterm-256color on hosts that fail
# ssh-terminfo - copies Ghostty's terminfo to the remote host on `ssh`
# (fixes "unknown terminal type xterm-ghostty")
shell-integration-features = cursor,sudo,title,ssh-env,ssh-terminfo
# -----------------------------------------------------------------------------
# KEYBINDS
# -----------------------------------------------------------------------------
# These are already macOS defaults, so they are not repeated here:
# Cmd+D split right Cmd+Shift+D split down
# Cmd+Option+arrows move between splits Cmd+Shift+Enter zoom split
# Cmd+Ctrl+arrows resize split Cmd+Ctrl+= equalize splits
# List defaults: ghostty +list-keybinds --default
# Wipe all defaults and start clean: keybind = clear
# Shift+Enter inserts a newline (multi-line prompts in CLI AI tools, chats).
keybind = shift+enter=text:\n