Skip to main content

Local Terminal

Run commands on your local machine without SSH connection. Perfect for quick tasks, local development, and managing your computer alongside remote servers.

What is Local Terminal?

Simple Explanation: Local Terminal is a built-in terminal that runs commands directly on your computer (where Xermius is installed), without connecting to any remote server via SSH.

Example:

# In Local Terminal - Runs on YOUR computer
ls -la ~/Documents
pwd
# Output: /Users/yourname

# In SSH Terminal - Runs on REMOTE server
ls -la ~/Documents
pwd
# Output: /home/remoteuser

Key Difference: Local = Your computer, SSH = Remote server

Why Use Local Terminal?

1. Quick Local Access

No need to switch apps:

Scenario: Deploy local build to server

Without Local Terminal:
1. Build in external terminal
2. Switch to Xermius
3. Connect to server
4. Deploy

With Local Terminal:
1. Build in Xermius local terminal
2. Deploy in same app (different tab)
All in one place!

2. Side-by-Side Comparison

Compare local vs remote:

Tab 1: Local Terminal
→ ls -la
→ du -sh *

Tab 2: SSH to Server
→ ls -la
→ du -sh *

Compare outputs side by side!

3. Unified Workflow

Everything in one app:

Tab 1: Local - Build project
Tab 2: Local - Git operations
Tab 3: SSH - Staging server
Tab 4: SSH - Production server
Tab 5: Local - Monitor logs

4. No Connection Required

Works offline:

  • No internet needed
  • No SSH setup required
  • Instant access
  • Always available

5. Same Features

All Xermius features work:

  • ✅ Themes & customization
  • ✅ Keyboard shortcuts
  • ✅ Copy/paste
  • ✅ Search in output
  • ✅ Split panes
  • ✅ Tab management
  • ✅ Snippets execution

Common Use Cases

1. Local Development

# Start development server
npm run dev

# Watch for changes
npm run watch

# Run tests
npm test

# Build project
npm run build

2. Git Operations

# Check status
git status

# Commit changes
git add .
git commit -m "Update feature"

# Push to remote
git push origin main

# Pull latest
git pull --rebase

3. File Management

# Navigate directories
cd ~/projects/myapp

# List files
ls -la

# Create directories
mkdir -p src/components

# Copy files
cp config.example.json config.json

# Find files
find . -name "*.log"

4. System Monitoring

# Check disk space
df -h

# Monitor processes
top

# Network connections
netstat -an

# System info
uname -a

5. Build & Deploy Workflow

# Build locally
npm run build

# Test build
npm run test:prod

# Then switch to SSH tab to deploy
# (Copy build to server)

6. Quick Commands

# Check local IP
ifconfig

# Ping server
ping server.example.com

# Test HTTP endpoint
curl https://api.example.com

# Download file
wget https://example.com/file.zip

7. Local Scripts

# Run custom scripts
./scripts/setup.sh

# Python scripts
python3 process_data.py

# Shell scripts
bash deploy.sh staging

How It Works

Architecture

┌─────────────────────────────────────┐
│ Xermius Desktop App │
├─────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌──────────────┐ │
│ │ Local Term │ │ SSH Term │ │
│ │ │ │ │ │
│ │ Your │ │ Remote │ │
│ │ Computer │ │ Server │ │
│ └──────┬──────┘ └──────┬───────┘ │
│ │ │ │
└─────────┼─────────────────┼─────────┘
│ │
↓ ↓
Local Shell SSH Connection
(bash/zsh) → Remote Shell

Process Flow

When you open Local Terminal:

1. Xermius spawns local shell process
(bash, zsh, fish, or powershell)

2. Shell starts in your home directory
(or configured default directory)

3. Terminal UI renders in Xermius

4. Your commands → Local shell

5. Shell output → Terminal display

No network involved!

Opening Local Terminal

Method 1: New Terminal Button

1. Click "+" button in terminal area
2. Select "New Local Terminal"
3. Terminal opens instantly

Method 2: Keyboard Shortcut

Press: Ctrl+Shift+T (Windows/Linux)
Cmd+Shift+T (macOS)

Local terminal opens in new tab

Method 3: Menu

1. Menu → Terminal → New Local Terminal
2. Or right-click terminal tab bar
3. Select "New Local Terminal"

Method 4: Quick Command

1. Press Ctrl+K (Cmd+K on Mac)
2. Type "local terminal"
3. Select "Open Local Terminal"
4. Press Enter

Terminal Interface

Tab Indicator

Local terminal tabs show indicator:

┌────────────────────────────────────┐
│ [💻 Local] [📡 server1] [📡 web]│
│ ↑ ↑ ↑ │
│ Local SSH SSH │
└────────────────────────────────────┘

Working Directory

Shows current directory in tab:

[💻 Local: ~/projects/myapp]

Updates automatically when you navigate:

cd ~/Documents
# Tab updates to: [💻 Local: ~/Documents]

Shell Type

Indicator shows active shell:

[💻 bash]  - Bash shell
[💻 zsh] - Zsh shell
[💻 fish] - Fish shell
[💻 pwsh] - PowerShell

Shell Selection

Default Shell

Xermius uses your system default shell:

macOS/Linux:

# Check default shell
echo $SHELL

# Common defaults:
/bin/bash
/bin/zsh
/usr/local/bin/fish

Windows:

PowerShell (default)
or
Command Prompt
or
Git Bash (if installed)

Changing Shell

Temporary (current session):

# Switch to bash
bash

# Switch to zsh
zsh

# Switch to fish
fish

Permanent (Xermius settings):

1. Settings → Terminal
2. Default Shell dropdown
3. Select preferred shell:
- System Default
- Bash
- Zsh
- Fish
- PowerShell
4. Save

Shell-Specific Features

Bash:

# Standard features
# Widely compatible
# Good for scripts

Zsh:

# Enhanced autocomplete
# Plugins (oh-my-zsh)
# Better globbing

Fish:

# Syntax highlighting
# Autosuggestions
# Web-based configuration

PowerShell:

# Windows-native
# Object-based pipeline
# .NET integration

Terminal Features

Copy & Paste

Copy:

  • Select text with mouse
  • Ctrl+C (Cmd+C on Mac)
  • Or right-click → Copy

Paste:

  • Ctrl+V (Cmd+V on Mac)
  • Or right-click → Paste
1. Press Ctrl+F (Cmd+F)
2. Type search term
3. Navigate results:
- Enter: Next match
- Shift+Enter: Previous match
4. ESC to close

Clear Screen

# Method 1: Command
clear

# Method 2: Keyboard
Ctrl+L

# Method 3: Reset terminal
reset

Scroll

  • Mouse wheel - Scroll up/down
  • Shift+PageUp - Scroll up one page
  • Shift+PageDown - Scroll down one page
  • Shift+Home - Scroll to top
  • Shift+End - Scroll to bottom

History

Command history:

# Previous command
↑ (Up arrow)

# Next command
↓ (Down arrow)

# Search history
Ctrl+R (reverse search)

# Show history
history

Tab Completion

# Type partial command/path
cd ~/Doc[TAB]
# Completes to:
cd ~/Documents/

# Multiple matches
git che[TAB][TAB]
# Shows: checkout, cherry-pick, etc.

Customization

Theme

Apply theme:

1. Settings → Appearance → Terminal Theme
2. Select theme:
- One Dark (default)
- Dracula
- Solarized Dark
- Solarized Light
- Nord
- Monokai
- Custom...
3. Applies to all terminals (local & SSH)

Font

Change font:

1. Settings → Terminal → Font
2. Font family: [JetBrains Mono ▼]
3. Font size: [14]
4. Font weight: [Normal ▼]
5. Save

Recommended fonts:

  • JetBrains Mono
  • Fira Code
  • SF Mono (macOS)
  • Cascadia Code
  • Source Code Pro

Cursor

Cursor style:

1. Settings → Terminal → Cursor
2. Style:
- Block (default)
- Underline
- Bar
3. Blinking: [✓]

Scrollback

History size:

1. Settings → Terminal → Scrollback
2. Lines: [1000]
- 500 (minimal)
- 1000 (default)
- 5000 (large)
- 10000 (very large)

Differences from External Terminal

Advantages

✅ Integrated:

  • All tabs in one app
  • Unified interface
  • Consistent experience

✅ Features:

  • Same shortcuts everywhere
  • Theme consistency
  • Snippet integration
  • Tab management

✅ Workflow:

  • Switch between local/remote easily
  • Copy commands between terminals
  • Unified history

Limitations

⚠️ System Integration:

  • Not a full system terminal replacement
  • Some advanced shell features may differ
  • Title bar handling varies

⚠️ External Tools:

  • GUI apps may not launch properly
  • Some interactive TUIs may have issues
  • System dialogs won't show

When to Use External Terminal

Use external terminal for:

  • Complex interactive programs (vim with plugins)
  • GUI app launching
  • System-level debugging
  • Terminal multiplexer (tmux/screen) sessions
  • Very long-running processes

Use Xermius Local Terminal for:

  • Quick commands
  • File operations
  • Git operations
  • Build commands
  • Script execution
  • Most development tasks

Tips & Tricks

1. Quick Directory Jump

Bookmark frequently used directories:

# Add to shell profile (~/.bashrc or ~/.zshrc)
alias proj="cd ~/projects"
alias docs="cd ~/Documents"
alias desk="cd ~/Desktop"

# Then just type:
proj
# Jumps to ~/projects

2. Run in Background

# Long-running process
npm run dev &

# Check jobs
jobs

# Bring to foreground
fg

# Continue in background
bg

3. Multiple Commands

# Sequential (one after another)
npm install && npm run build && npm test

# Parallel (all at once)
npm run watch & npm run dev

# Conditional
npm test || echo "Tests failed!"

4. Output Redirection

# Save output to file
npm run build > build.log

# Append to file
npm test >> test-results.log

# Save errors
npm run build 2> errors.log

# Save everything
npm run build &> all-output.log

5. Quick File Creation

# Create and open file
touch newfile.txt && code newfile.txt

# Create with content
echo "Hello World" > file.txt

# Append content
echo "More text" >> file.txt

6. Process Management

# Find process by name
ps aux | grep node

# Kill process
kill -9 <PID>

# Kill by name
pkill -f "node server"

7. Network Testing

# Test connection
ping -c 4 google.com

# Check port
nc -zv localhost 3000

# HTTP request
curl -I https://example.com

# Download file
curl -O https://example.com/file.zip

Troubleshooting

Terminal Won't Open

Issue: Local terminal doesn't open

Causes:

  • Shell not found
  • Permission issues
  • Path problems

Solutions:

Check default shell:

# In Settings
Settings → Terminal → Default Shell
→ Try "System Default"

Verify shell exists:

# macOS/Linux - in external terminal
which bash
which zsh

# Should return path like:
/bin/bash
/bin/zsh

Reset settings:

Settings → Advanced → Reset Terminal Settings

Shell Doesn't Start

Issue: Terminal opens but shell won't start

Causes:

  • Shell configuration error
  • Broken shell profile
  • Missing dependencies

Solutions:

Check shell profile:

# Look for errors in:
~/.bashrc
~/.bash_profile
~/.zshrc
~/.config/fish/config.fish

Test shell manually:

# In external terminal
bash --norc
# If works, problem is in .bashrc

Use safe mode:

Settings → Terminal → Start Shell Without Profile
[✓] Enable

Commands Not Found

Issue: Commands work in external terminal but not in Xermius

Cause: PATH environment variable not loaded

Solution:

Check PATH:

echo $PATH

Add to shell profile:

# In ~/.bashrc or ~/.zshrc
export PATH="/usr/local/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"

Reload profile:

source ~/.bashrc  # or ~/.zshrc

Slow Performance

Issue: Local terminal is slow

Causes:

  • Large scrollback buffer
  • Complex shell prompt
  • Many history entries

Solutions:

Reduce scrollback:

Settings → Terminal → Scrollback
Lines: 1000 → 500

Simplify prompt:

# In shell profile
# Simple prompt instead of fancy one
PS1='\u@\h:\w\$ '

Clear history:

history -c

Copy/Paste Not Working

Issue: Can't copy or paste text

Solutions:

Use keyboard shortcuts:

Copy: Ctrl+Shift+C (not Ctrl+C)
Paste: Ctrl+Shift+V (not Ctrl+V)

Or use right-click menu

Check settings:

Settings → Terminal → Copy/Paste
[✓] Enable clipboard integration

Colors Look Wrong

Issue: Colors don't display correctly

Solutions:

Check terminal type:

echo $TERM
# Should be: xterm-256color

Set in shell profile:

# Add to ~/.bashrc or ~/.zshrc
export TERM=xterm-256color

Try different theme:

Settings → Appearance → Terminal Theme
→ Try different themes

Best Practices

1. Organize Tabs

Naming pattern:
[💻 Local: Build]
[💻 Local: Git]
[💻 Local: Tests]
[📡 Server: Logs]
[📡 Server: Deploy]

2. Use Aliases

# In ~/.bashrc or ~/.zshrc
alias ll='ls -la'
alias gs='git status'
alias gp='git pull'
alias build='npm run build'
alias test='npm test'

3. Save Important Commands

As snippets:

1. Run command in local terminal
2. Right-click terminal
3. "Save Last Command as Snippet"
4. Reuse anytime!

4. Keep Sessions Organized

Local Terminal for:
✓ Building code
✓ Running tests
✓ Git operations
✓ Local file management

SSH Terminal for:
✓ Server management
✓ Log monitoring
✓ Remote deployments
✓ Service restarts

5. Background Long Processes

# Don't block terminal
npm run dev &

# Or use separate tab

6. Document Complex Commands

# Add comments in command
npm run build # Build for production

# Or save as snippet with description

Keyboard Shortcuts

Terminal Management:

  • Ctrl+Shift+T - New local terminal
  • Ctrl+Shift+W - Close terminal
  • Ctrl+Tab - Next terminal
  • Ctrl+Shift+Tab - Previous terminal

Terminal Actions:

  • Ctrl+Shift+C - Copy
  • Ctrl+Shift+V - Paste
  • Ctrl+Shift+F - Find
  • Ctrl+L - Clear screen

Navigation:

  • Ctrl+Left/Right - Jump words
  • Ctrl+A - Start of line
  • Ctrl+E - End of line
  • Ctrl+K - Delete to end

History:

  • Up/Down - Navigate history
  • Ctrl+R - Search history
  • Ctrl+G - Cancel search

Next Steps