Managing a Linux server is built on being comfortable with the command line. Without a graphical interface, you can manage the entire system with a few dozen commands. This guide offers a practical reference of the most-used Linux server commands, grouped by function.

Related reading: Connecting to a server with SSH · KEYDAL hosting · Linux Server Administration Basics: SSH, Firewall, Cron, and Service Management

Viewing File Content and Searching

Reading configuration files, inspecting logs and searching text is an important part of daily administration.

  • cat file - prints the entire content of short files.
  • less file - shows long files page by page, scrollable.
  • tail -f /var/log/... - follows a log file live.
  • grep "text" file - searches for text within a file.
  • find /path -name "*.log" - finds files matching a pattern.

System and Resource Monitoring

To understand your server's health you need to monitor CPU, memory and disk usage. These commands are the starting point for troubleshooting.

CommandFunction
top / htopLive CPU, memory and process monitoring
df -hFill level of disk partitions
du -sh *Folder sizes in the current directory
free -hRAM and swap usage
uptimeUptime and load average

Process Management

You use these commands to see running programs, terminate a stuck process or check a service's status: ps aux lists all processes, kill PID terminates a process, and systemctl status service shows a service's state. We will cover service management in depth in a separate guide.

Networking and Connection Commands

  • ip a - shows network interfaces and IP addresses.
  • ping domain - tests reachability of a target.
  • curl -I https://site - fetches a URL's HTTP response headers.
  • ss -tulpn - lists listening ports and services.

Permission and Package Commands

System-level operations require administrator privileges; you prefix the command with sudo. To install software you use your distribution's package manager: apt on Debian/Ubuntu, dnf on RHEL/Rocky. We will examine file permissions and package management in detail in later articles of this series.

Frequently Asked Questions

Do I need to memorize all these commands?

No. For daily use 15-20 commands are enough; you learn the rest from man pages as needed. They become permanent with practice.

How do I view command history?

The history command lists previous commands. You can scroll recent commands with the up arrow and search history with Ctrl+R.