Cantech Knowledge Base

Your Go-To Hosting Resource

Learn to Access the Command Line

cPanel and WHM have user-friendly dashboards, and a lot of tasks are automated, but knowledge of how to use the command line can give you a real edge. With it, you have a shortcut to more control, faster actions, and deeper insights into your server. Also, it is a powerful way to manage your hosting that gives much more than just clicking around the interface.

Well, both these dashboards provide you with a way to reach the command line from their interface itself. That is, you do not need any complicated software setups. Also, the Terminal feature in cPanel and WHM is like a built-in door to your server’s core.

However, they must allow the root user to use the BASH shell by default so everything works as expected. Well, admins can set a different shell for you as per the permissions in case you are not the root user. The Terminal interface is available from version 72 onwards, so you can proceed with the updated software.

We will discuss more on how you can actually access the command line on your system and connect to your server properly.

Get into the Command Line for Your cPanel & WHM Server

Follow the steps below to get started, depending on your operating system.

Open the Command Line on Your Computer

Open the terminal depending on your computer –

Windows for Command Prompt – Click the Start button on your screen. Then type “Command Prompt” into the search bar. You will see a program called Command Prompt; click it to open.

Mac for Terminal app – Go to your dock and click on the Applications icon. Inside that, find and open the Utilities folder. You will find the Terminal icon there. Click it to launch.

Ubuntu – Just press the Ctrl + Alt + T keys together. This shortcut will bring up your Terminal immediately.

At this point, you have opened a local command line interface (CLI) on your computer. But right now, it is still not connected to your web server. To do that, you need to log in via SSH.

Connect to Your cPanel or WHM Server Using SSH

So, now connect to your web server. You will be using a command that looks something like this:

ssh username@hostname

Here’s how it works:

  • username is your actual server account’s username.
  • hostname is the name of your server or domain.

So, if you are the root user and your domain is example.com, then your command will be:

ssh [email protected]

After typing the command, press Enter.

Enter Your Password

After the command runs, the terminal will ask you to type your password. This is the password for the server account you are logging in with.

Type your password carefully and press Enter.

Note: When you type your password, it won’t show any stars or dots. That’s normal. Just type it fully and press Enter.

Check If You Are Logged In Properly

Your screen will now show something like this –

Last login: [date and time]
username@hostname [~]#

You will see a prompt where you can type commands. This means you are now inside your server via SSH. From here, you can explore your server, check files, run commands, and perform many advanced tasks. But, remember that your access is limited to what your user permissions allow.

Important Notes to Keep in Mind

Sometimes things don’t go as planned. If you see an error like this:

ssh: connect to host example.com port 22: Connection refused

It means that SSH access is not enabled for your account. This is common with many shared hosting providers. In such a case, you will need to reach out to your hosting company or system administrator. They will tell you whether SSH access is available and how to enable it if it’s not.

Also, SSH access is powerful, but with great power comes responsibility. Because of security reasons, hosting providers often disable shell access or limit it to trusted users only. Always follow the security guidelines while working on the server.

Final Thoughts

Getting access to the command line through cPanel or WHM makes you a more powerful user. Whether you are fixing issues, managing files faster, or configuring settings that the GUI doesn’t offer, the command line helps you do all that with precision and speed.

July 14, 2025