Terminal Access
The Terminal Access section of the dxflow interface provides a powerful web-based terminal that connects you directly to containerized environments. This feature enables command-line interaction with your workflows, applications, and the underlying system infrastructure.
Overview
The Terminal interface offers comprehensive command-line access:
Web Terminal
Browser-Based Access
- Full-featured terminal in your browser
- No additional software required
- Cross-platform compatibility
- Secure WebSocket connections
Container Access
Direct Container Shell
- Connect to running containers
- Debug applications in real-time
- Access container filesystems
- Execute container commands
Multi-Session
Session Management
- Multiple concurrent terminals
- Persistent sessions
- Auto-reconnection support
- Session sharing capabilities
Security
Secure Access
- Encrypted connections
- Role-based permissions
- Audit logging
- Resource limitations
Key Features
Web Terminal Interface
The web-based terminal provides a native command-line experience:
Native Terminal Experience
- Full VT100/xterm Compatibility: Support for all standard terminal features
- Unicode Support: Full UTF-8 character set support
- Resize Handling: Automatic terminal resizing based on browser window
- Copy/Paste: Standard keyboard shortcuts and context menu support
- WebSocket Communication: Real-time bidirectional terminal communication
Visual Customization
- Color Schemes: Multiple built-in color themes
- Font Options: Customizable font size and family
- Scrollback Buffer: Configurable history buffer size
- Split Views: Multiple terminals in split screen
Shell Management
Shell Session Creation
Web Interface Options:
New Shell
Quick Start
- Click "New Terminal" button
- Auto-configured environment
- Default shell selection
- Instant connection
Custom Shell
Advanced Configuration
- Choose shell type (bash, zsh, sh)
- Set working directory
- Configure environment variables
- Custom resource limits
Container Shell
Container Access
- Select running container
- Auto-detect shell type
- Container-specific environment
- Isolated filesystem access
Session Management
Each shell session includes:
- Unique Identity: Auto-generated or custom session identifier
- WebSocket Connection: Real-time bidirectional communication
- Session State: Tracks running processes and command history
- Resource Monitoring: CPU and memory usage tracking
Terminal Operations
Interactive Shell Usage
Run Commands
# Basic commands
pwd # Show current directory
ls -la # List files and directories
cd /path/to/dir # Change directory
cat filename # View file contents
# Process management
ps aux # View running processes
top # Real-time process monitor
kill -9 PID # Terminate process
# File operations
touch newfile # Create new file
mkdir newdir # Create directory
cp source dest # Copy files
mv old new # Move/rename files
rm filename # Delete files
Advanced Features
- Command History: Navigate with ↑/↓ arrow keys
- Tab Completion: Auto-complete with Tab key
- Signal Handling: Ctrl+C (interrupt), Ctrl+Z (suspend), Ctrl+D (exit)
- Screen Management: Ctrl+L (clear), Ctrl+A/E (line navigation)
Container Shell Access
Containerized Environment Access
Running Containers
Active Containers
- Access application containers
- Debug running services
- View container logs
- Inspect processes
Service Containers
Infrastructure Access
- Database shells (MySQL, PostgreSQL)
- Cache services (Redis, Memcached)
- Message queues (RabbitMQ, Kafka)
- Custom services
Development Environments
Dev Tools
- Language-specific shells
- Package managers
- Build tools
- Debugging utilities
Session Management
Multi-Session Support
Manage Sessions
- Multiple Terminals: Open unlimited concurrent sessions
- Session Persistence: Sessions survive browser refreshes
- Auto-reconnection: Automatic reconnection on network issues
- Session Sharing: Collaborate with team members
Track Activity
- Active Sessions: View all open terminals
- Resource Usage: Monitor CPU and memory per session
- Connection Status: Real-time health monitoring
- Session History: Command history and activity logs
API Integration
WebSocket Connection
The terminal uses WebSocket connections for real-time communication:
Connection Endpoints
# WebSocket connection to specific shell session
GET /api/shell/:identity/
Session Management API
# Shell operations
GET /api/shell/ # List all active shell sessions
POST /api/shell/ # Create new shell session
PUT /api/shell/resize/ # Resize terminal dimensions
PUT /api/shell/execute/ # Execute commands programmatically
PUT /api/shell/kill/ # Kill processes in shell
DELETE /api/shell/ # Remove shell session
Getting Started
Step 1: Access Terminal
After logging in, navigate to the "Terminal Access" section from the main menu.
Step 2: Create Your First Shell
- Click "New Terminal" to create a new shell session
- Choose environment:
- System shell (direct access to host system)
- Container shell (access to running container)
- Custom environment (specific working directory or user)
- Configure session (optional):
- Set working directory
- Configure environment variables
- Choose shell type (bash, zsh, sh)
Step 3: Basic Terminal Usage
Once connected to a shell session:
Essential Commands
pwd # Show current directory
ls -la # List files and directories
cd /path # Change directory
cat filename # View file contents
nano filename # Edit files
ps aux # View running processes
top # Real-time process monitor
File Management
touch filename # Create new file
mkdir dirname # Create directory
cp source dest # Copy files
mv old new # Move/rename files
rm filename # Delete files
Advanced Usage
Screen and Tmux
For persistent sessions beyond browser connections:
# Screen commands
screen -S session_name # Create named session
screen -ls # List sessions
screen -r session_name # Reattach to session
Ctrl+A, D # Detach from session
# Tmux commands
tmux new -s session_name # Create named session
tmux ls # List sessions
tmux attach -t session # Reattach to session
Ctrl+B, D # Detach from session
Best Practices
Security Guidelines
- Use appropriate user permissions for different tasks
- Avoid running unnecessary services as root user
- Regular cleanup of temporary files and processes
- Monitor resource usage to prevent system overload
- Enable audit logging for compliance requirements
Efficient Sessions
- Use descriptive names for long-running sessions
- Clean up unused sessions to free resources
- Use screen or tmux for persistent background processes
- Document important session configurations
- Set resource limits for intensive operations
Optimization Tips
- Limit the number of concurrent sessions
- Monitor system resources during intensive operations
- Use efficient commands and avoid resource-heavy processes
- Close unused terminal sessions promptly
- Configure appropriate scrollback buffer sizes
Productivity Tips
- Use terminal for debugging application issues
- Access container environments for troubleshooting
- Combine terminal with file management for efficiency
- Leverage shell scripting for automation tasks
- Create aliases for frequently used commands
Troubleshooting
- Check if the dxflow engine is running:
dxflow ping - Verify WebSocket connectivity in browser console
- Ensure firewall allows WebSocket connections
- Try refreshing the browser or creating a new session
Common Issues
- Session Timeout: Sessions may timeout after extended inactivity. Refresh the page to reconnect.
- Copy/Paste Issues: Use Ctrl+Shift+C/V or right-click context menu for clipboard operations.
- Display Problems: Resize the terminal window or use
resetcommand to fix display issues. - Permission Denied: Ensure proper user permissions for the requested operations.
The Terminal Access interface provides direct shell access to your dxflow environment, enabling powerful command-line operations, debugging capabilities, and system administration tasks through an intuitive web-based terminal.
Files & Data
The dxflow files and data management features allow you to efficiently handle input and output data within your workflows. This guide will help you understand how to manage files and data in dxflow.
CLI Reference
Complete command-line interface reference for the dxflow engine with detailed usage examples and options