Getting Started with Essential Linux Commands

This article introduces essential Linux commands that cPanel and WHM users can use to manage files, directories, processes, and system configurations. It also explains how to combine commands, view system information, and locate common configuration files on a Linux server.

Linux CommandscPanel CLIServer Management

~3 min read · Updated Feb 18, 2026

1. Introduction


While cPanel & WHM automates many administrative tasks, understanding basic Linux commands helps users manage files, troubleshoot issues, and interact with their server more efficiently. This guide covers essential commands and examples to help you get started.


2. Common Linux Commands


To run a command, type it into the CLI and press Enter. Replace FILENAME or LOCATION with your actual paths.


Command Description Example
cat FILENAME Prints the contents of a file. cat filename.txt
cd LOCATION Navigate between directories. cd /usr/local/apache/
chmod permissions FILENAME Change file permissions. chmod 755 myfile.txt
chown USER:GROUP FILENAME Change file ownership. chown user:group file.txt
cp FILE1 FILE2 Copy a file. cp original.txt /copies/duplicate.txt
du Show disk usage. du
file FILENAME Detect file type. file filename
grep string FILENAME Search for text inside a file. grep 'example text' file.txt
last Show recent logins. last
ln -s file1 file2 Create a symbolic link. ln -s /path/file1.txt link.txt
ls List files and directories. ls
ls -al View hidden files and details. ls -al
more FILENAME View file contents page by page. more filename.txt
netstat List network connections. netstat
pico FILENAME Edit a file using pico. pico file.txt
ps Show running processes. ps
rm FILENAME Delete a file. rm trash.txt
tail -## FILENAME Show last lines of a file. tail -20 file.txt
touch FILENAME Create an empty file. touch example.txt
vi FILENAME Edit a file using vi. vi file.txt
w Show logged‑in users. w
wc FILENAME Count words in a file. wc file.txt
whereis NAME Locate installed applications. whereis perl

3. Running Multiple Commands on One Line


  • | — Pipe output from one command to another
  • > — Overwrite or create a file
  • >> — Append to a file
  • < — Use a file as input

Examples


grep User /usr/local/apache/conf/httpd.conf | more

last -a > /root/lastlogins.tmp

mysql --skip-column-names --batch -e 'show processlist' | wc -l

netstat -an | grep :80 | wc -l

tail -10000 /var/log/exim_mainlog | grep 'example\.com' | more

4. Common Configuration Files and Directories


ServiceLocations
Exim /etc/exim.conf
/var/log/exim_mainlog
/var/log/exim_rejectlog
/etc/valiases/
/etc/vfilters/
/home/username/.forward
MySQL /root/.my.cnf
/etc/my.cnf
/var/lib/mysql/
ProFTPD /etc/proftpd.conf
/var/log/xferlog
/etc/proftpd/
SSH /etc/ssh/sshd_config
System /var/log/messages
/var/log/dmesg

Conclusion


Learning essential Linux commands helps you manage your server more effectively, troubleshoot issues faster, and understand how cPanel & WHM interacts with the underlying operating system.


Written & researched by Dr. Shahin Siami

Related Articles

How to Restore Your cPanel Account: A Complete Guide for New System Administrators

This guide explains how new system administrators can restore a cPanel account using WHM, transfer accounts and configurations between servers, and enable diagnostic logging for transfer and restore operations. It covers essential concepts such as WHM vs. cPanel, root access, backup handling, SFTP uploads, transfer methods, and advanced debugging tools.

Continue

آموزش کامل انتقال تمام اکانت‌های cPanel از یک سرور به سرور دیگر

این مقاله نحوه انتقال همه اکانت‌های cPanel، تنظیمات سرویس‌ها، گواهی‌های SSL و IP اصلی سرور را از یک سرور قدیمی (Source) به یک سرور جدید (Target) توضیح می‌دهد. شامل نصب سرور جدید، انتقال تنظیمات، انتقال اکانت‌ها، تغییر IP، تنظیم DNS و نصب مجدد SSL است.

Continue

How to Migrate a WordPress® Installation to a cPanel & WHM Server

This guide explains how to migrate a WordPress installation from a macOS-hosted environment to a cPanel & WHM server. It covers exporting the database, uploading WordPress files, creating and importing a MySQL database, updating URLs, configuring wp-config.php, fixing broken links, and finalizing the migration.

Continue

How to Manually Transfer an Account Between Servers in cPanel & WHM

This article explains how to manually transfer a cPanel account between servers when the account is too large for WHM’s automated transfer tools. It covers creating temporary directories, compressing public_html and log files, securely transferring data with SCP, and restoring the files on the destination server.

Continue

How to Manually Migrate Horde Calendars and Contacts to Roundcube in cPanel & WHM

This article explains how to manually migrate Horde calendars and contacts to Roundcube in cPanel & WHM version 108 through 118. It covers exporting Horde data, placing it in the correct directories, and importing it into Roundcube using built‑in plugins or manual import tools.

Continue

How to Manually Migrate Accounts to cPanel & WHM from Unsupported Control Panels

This article explains how experienced system administrators can manually migrate accounts from unsupported third‑party control panels to cPanel & WHM. It covers pre‑migration steps, installation requirements, file and directory transfers, database restoration, SSL migration, and post‑migration tasks.

Continue