# Command Line Support

ServBay provides command line support, allowing you to install ServBay's command line tools in bash or zsh. Here are the installation steps:

  1. Open the ServBay.

  2. Click on "Settings" in the left navigation bar.

  3. In the settings page, find the "Command-line tools" option.

  4. Click on "Install cli tools to zsh" or "Install cli tools to bash," depending on your terminal environment.

  5. After installation is complete, reopen your terminal, and the command line tools will be effective.

# Set Default Package Versions

If you wish to set default software versions, such as default PHP or MariaDB versions, you can refer to the Set Default Package Versions document for detailed steps.

# Run Specific Version of PHP

ServBay supports directly running specific versions of PHP, such as php-5.6 or phpize-8.3. You can use these commands in the terminal to perform operations with specific versions of PHP.

# Example Commands

  • View the currently installed PHP version:

    php -v
  • Run a PHP script using PHP 5.6:

    php-5.6 your_script.php
  • Connect to a PostgreSQL database:

    psql -h localhost -U your_user -d your_database
  • Execute an SQL query:

    psql -h localhost -U your_user -d your_database -c "SELECT * FROM your_table;"
  • View Redis status:

    redis-cli info stats

With these example commands, you can utilize various services provided by ServBay in the command line environment.

Last Updated: 11/23/2023