How to Access the Command Line
While cPanel & WHM automates many server administration tasks, familiarity with the Linux command line can prove useful for both WHM and cPanel users. This documentation describes how to access the command line.
cPanel & WHM requires the
rootuser to use BASH by default. System administrators can modify the shell for other users.
Access the command line
To access your cPanel & WHM server from the command line, perform the following steps:
- Use the correct method for your computer's operating system to open the command line interface (CLI):
- Microsoft Windows® — Open the Command Prompt program. To do this, click Start and enter
Command Promptin the Search text box. Double-click Command Prompt in the list that appears.
- MacOS® — Open the Terminal program. To do this, click the Applications icon in the dock, click the Utilities icon, and then click the Terminal icon.
Ubuntu — Open the Terminal program. To do this, press the
Your CLI program opens with access to the local computer. You must use SSH to access the cPanel & WHM server. To do this, enter the following command and press Enter:
In this comment,
usernameis your account's username, and
hostnameis the server's hostname. For example, to log in as the
rootuser on the
example.comserver, run the following command:
- The CLI prompts you for the account's password. Enter it and press Enter.
The CLI's display will appear similar to the following example.
Last login: Fri Feb 6 12:50:38 on ttys000
Last login: Fri Feb 6 12:52:33 2015 from 10.1.4.202
You can now navigate the server's file system and run commands, within the limits of your account's permissions on the server.
If you receive an error message that appears similar to the following example, you may not have SSH privileges enabled on the server.
: connect to host example.com port 22: Connection refused
Contact your hosting provider or system administrator for more information. Because command line access (shell access) has certain security implications, many web hosting providers restrict this access.
Was this answer helpful?
Overview Warning: We strongly recommend that only advanced users create custom backup...
Overview In cPanel & WHM version 11.52, we added scripts to manage the Interface Lock...
Overview ProFTPd© does not automatically reference /etc/hosts.allow or /etc/hosts.deny to...
Overview This document explains how to disable prelinking. Prelinking often causes issues, and...
Overview Warning: The steps in this document are for advanced users only. The Exim...