Updated: 28 September 2026 · Applies to: cPanel & WHM version 138 (checked on an AlmaLinux 9 server)
These are the commands and files a cPanel server administrator uses most, from checking the version to finding which account owns a domain or why an email did not arrive. Every path below was checked on a cPanel & WHM 138 server. Run them as root over SSH. For cPanel's maintenance scripts (updates, service restarts, account backups), see useful cPanel and WHM command-line scripts.
Version and status
/usr/local/cpanel/cpanel -V # cPanel & WHM version, for example "138.0 (build 10)" whmapi1 servicestatus # status of all monitored services whmapi1 version
Accounts and domains
grep example.com /etc/userdomains # which account owns a domain or subdomain cat /etc/trueuserdomains # main domain of every account cat /etc/trueuserowners # which reseller owns each account cat /var/cpanel/users/USERNAME # an account's settings (plan, IP, contact email) whmapi1 listaccts # all accounts, with details
Disk usage
repquota -a | sort -k3 -n -r | head # accounts using the most disk space du -sh /home/USERNAME/* | sort -h # what uses the space inside one account
exim -bpc # number of messages in the mail queue exim -bp | head -50 # the queue itself exiqgrep -i -f sender@example.com # queued message IDs from one sender exim -Mvh MESSAGE-ID # headers of one queued message grep 'recipient@example.com' /var/log/exim_mainlog | tail # delivery log for one address
Incoming IMAP and POP3 logins are logged in /var/log/maillog.
Logs worth knowing
/usr/local/cpanel/logs/error_log: errors of cPanel and WHM themselves./usr/local/cpanel/logs/login_log: logins to cPanel, WHM and Webmail, including failures./usr/local/cpanel/logs/access_log: requests to the cPanel and WHM interfaces./var/log/apache2/error_log(also reachable as/etc/apache2/logs/error_log): the web server's error log./var/log/exim_mainlog: every email the server sends and receives./var/log/messages: general system messages.
Web server configuration
Apache's main configuration is /etc/apache2/conf/httpd.conf. It is generated by cPanel: make lasting changes through WHM (for example Service Configuration › Apache Configuration › Include Editor), because direct edits are overwritten when cPanel rebuilds the file.
Prefer to have a team handle this? Our cPanel server management covers updates, security, migrations and troubleshooting.
Official documentation: cPanel & WHM documentation.
