Page tree
Skip to end of metadata
Go to start of metadata

Is there a cheat sheet for shell commands?

Yes. For more information, read our Getting Started with Linux Commands documentation.

Where can I find programs?

You can find the most common programs in the following locations:

  • /usr/sbin/sendmail
  • /usr/bin/perl
  • /bin/mail
  • /usr/bin/php

You can use any of the following options to find a program:

  • Run the whereis program command to show one or more programs that match your search term.
  • If you have more than one copy of a program, run the which program command to find which program the shell calls first.
  • If the first two options do not find the desired program, run the locate program command to display every file that matches your search term.


  • Before you use these options, use SSH to log in to the shell.
  • In the command for each option, program is the program that you wish to find. 

Default locations for common configuration files and directories













Which ports should I open if my cPanel server is behind a firewall?

For a list of the ports that cPanel & WHM services use, read our How to Configure Your Firewall for cPanel & WHM's Services documentation.

How do I find all of the SETUID root files on my server?

The following command will show all of the SETUID and SETGID files on the server:

find / -type f \( -perm -04000 -o -perm -02000 \) \-exec ls -lg {} \; 

Can I use Linux on any computer?

While Linux is a general term for many operating systems, most distributions of these operating systems support most hardware. You can find more information at your specific operating system's website.

A single job in my crontab sends an email every time that it runs. How can I disable it?

To ensure that a single job in your crontab does not send an email every time that it runs, perform the following steps:

  1. Locate the following string in the crontab:

    0 * * * * /home/user/
  2. Add the following string to that line in the crontab:

    /dev/null 2>&1
  3. Save your changes.

I do not want my crontab to send email. How can I disable this?

To ensure that crontab cannot send emails, remove the contact email address from the crontab.

How do I see what is on the console screen of my Linux server?

To view the data that currently displays on your server's console screen, run the following command:

cat /dev/vcs1

I use Windows. How can I log in to my server?

You must first download an SSH client. We recommend that you use PuTTY. You can download this free client from the PuTTY website .

How can I view all of the running processes from the shell?

Run one of the following commands:

ps -auxww
ps -cef

For more information use about the ps command, run the man ps command.

How can I see all of the users with the UID of 0 on the shell?

Run the following command:

grep :x:0: /etc/passwd

How can I check which environment variables a process runs?

Run the following command:

ps auxwwe | grep processname

How can I see a list of the users who have logged in to the server?

Use the last command (for example, last -30). This command displays the last 30 users who logged in to the server.

Can I change the root user’s default shell?

cPanel requires the root user to use the bash shell by default. Other users can use shells that are not bash if the system administrator wishes to make this an option.