# 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:
- Open ServBay, click on "Settings" in the left navigation bar.
In the settings page, find the "Command-line tools" option.
Click on "Install cli tools to zsh" or "Install cli tools to bash," depending on your terminal environment.
- 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
1Run a PHP script using PHP 5.6:
php-5.6 your_script.php
1Connect to a PostgreSQL database:
psql -h localhost -U your_user -d your_database
1Execute an SQL query:
psql -h localhost -U your_user -d your_database -c "SELECT * FROM your_table;"
1View Redis status:
redis-cli info stats
1
With these example commands, you can utilize various services provided by ServBay in the command line environment.