StarDomain

Using the Terminal in DirectAdmin

Using the Terminal in DirectAdmin

DirectAdmin includes a built-in web-based terminal that lets you run shell commands directly from your browser without installing any SSH client software.

Accessing the Web Terminal

  1. Log in to DirectAdmin
  2. Navigate to Extra Features or Advanced Features
  3. Click Terminal or Web Terminal
  4. A terminal window will open in your browser
  5. You are automatically logged in as your DirectAdmin user

Tip: The web terminal works on any device with a modern browser, including tablets and phones.

What You Can Do in the Terminal

The web terminal gives you the same access as a standard SSH connection. Common uses:

File Management

bash
# Navigate to your website directory
cd ~/domains/yourdomain.com/public_html

# List all files including hidden ones
ls -la

# Create a new directory
mkdir backups

# Move files
mv oldname.html newname.html

# Delete a file
rm unwanted-file.txt

# Find large files
find . -type f -size +10M

Package Management (Node.js/Python)

bash
# Install Node.js dependencies
cd ~/myapp
npm install

# Install Python packages
pip install flask --user

# Check installed versions
node -v
python3 --version
php -v

Database Operations

bash
# Connect to MySQL
mysql -u username_dbuser -p username_dbname

# Import a database
mysql -u username_dbuser -p username_dbname < backup.sql

# Export a database
mysqldump -u username_dbuser -p username_dbname > backup.sql

WordPress CLI (WP-CLI)

bash
# Check WordPress status
cd ~/domains/yourdomain.com/public_html
wp core version

# Update WordPress
wp core update

# Update plugins
wp plugin update --all

# Search and replace in database
wp search-replace 'old-domain.com' 'new-domain.com'

Git Operations

bash
# Clone a repository
cd ~/domains/yourdomain.com/public_html
git clone https://github.com/user/repo.git .

# Pull latest changes
git pull origin main

Terminal Shortcuts

ShortcutAction
TabAuto-complete file/directory names
Ctrl+CCancel current command
Ctrl+LClear the terminal screen
Up ArrowPrevious command
Ctrl+RSearch command history

Limitations

  • The terminal runs within your CloudLinux container with the same resource limits as your hosting account
  • You cannot install system-level packages (e.g., apt install or yum install)
  • Root access is not available on shared hosting
  • Session may timeout after inactivity

Troubleshooting

Terminal Not Loading

  • Clear your browser cache
  • Try a different browser
  • Disable browser extensions that might block WebSocket connections

Command Not Found

  • Use the full path to the command (e.g., /usr/local/bin/php instead of php)
  • Check available versions with which php or which node

Permission Denied

  • You can only modify files owned by your user
  • Use chmod to adjust file permissions within your home directory

Need help? Contact our support team at {{SUPPORT_EMAIL}} or open a ticket at {{SUPPORT_URL}}.