# 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 the 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
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:
Run a PHP script using PHP 5.6:
Connect to a PostgreSQL database:
psql -h localhost -U your_user -d your_database1
Execute an SQL query:
psql -h localhost -U your_user -d your_database -c "SELECT * FROM your_table;"1
View Redis status:
redis-cli info stats1
With these example commands, you can utilize various services provided by ServBay in the command line environment.