BuycPanel Blog

BuycPanel Blog

Latest news and updates

Steps to Access the Command Line in cPanel and WHM

Posted by Allura on 10 07 2018.

A Brief Introduction to the Linux Command Line

cPanel and WHM makes it easier for its users to manage their system by automating many server administration tasks. However, for better control and performance, it is recommended that the users of cPanel and WHM familiarise themselves with the Linux command line. Given below are the steps to access the command line.


  • BASH should be used by default by the root user as is required by cPanel and WHM. The shell can be modified for other users by the system administrators.
  • cPanel and WHM version 72 or later offers you two ways to access the command line through their interface: you can either use cPanel’s Terminal interface (cPanel > Home > Advanced > Terminal) or you can use WHM’s Terminal interface (WHM > Home > Advanced > Terminal )


Accessing the Command Line

Perform these steps to gain access to your cPanel and WHM server using the command line:

  1. Use the appropriate method based on your system’s operating system to access the command line interface (CLI):
  • Microsoft Windows® – Run the Command Prompt application. You can do this by clicking on Start and by entering Command Prompt in the Search text box. In the list of search results, double-click on Command Prompt.
  • MacOS® – Run the Terminal program. Click on the Applications icon in the dock. Then click the Utilities icon, and finally the Terminal icon.
  • Ubuntu – Press the Ctrl+Alt+T keys to run the Terminal program.
  1. The CLI program will already have access to the local computer on launching. In order to access the cPanel and WHM server you need to use SSH. You can do this by entering these following commands and pressing Enter:

ssh username@hostname

In this command, your account’s username goes in place of username, and hostname stands for the server’s hostname. For example, if you want to log in to the server of as a root user, execute the following command:


  1. You will need to enter your account’s password for the CLI. Press Enter after you have done it.
  2. The CLI will something similar to this:

The server’s file system will now be easily navigable and commands can be executed. These activities are of course limited by your account’s permissions on the server.

A Special Note:

If you do not have SSH privileges activated on the server, you will see an error message similar to this example:

ssh: connect to host port 22: Connection refused 


This can be resolved by contacting your system administrator or hosting provider for more information.