LINUX COMMAND REFERENCE

Commands for managing servers

Files, networking, processes and services: 127 commands with syntax, options and examples for SSH sessions.

These examples use Linux and Bash. Available utilities and options vary by distribution. Commands run on the server you connect to.

Choose a command for the task

Use this command reference when administering a Linux server over SSH. Each guide explains syntax, shows concrete examples, describes their results and answers troubleshooting questions. Choose a task below, then read the selected guide before running its examples.

Viewing and processing text18

Inspect logs and transform text without opening a full editor. Choose literal matching, field extraction or stream processing according to the input format; keep transformed output separate until it is verified.

Permissions, users and access14

Diagnose access using identity, ownership and permission information. Grant only the access required for the operation; account changes and recursive permission changes can affect active services.

Processes and tasks15

Identify the relevant process or shell job before changing its state. Use graceful termination where appropriate, and distinguish shell job control from services managed by the system.

Disks and file system11

Check capacity, inode use, device identity and mount relationships before storage maintenance. The listing examples are starting points for diagnosis, not instructions to format an unfamiliar device.

Network and remote access17

Check DNS resolution, routing, transport and authentication in order. A successful ping or open port does not prove that an SSH login or file transfer will succeed.

Archives and compression6

Choose between compressing one stream and packaging a directory tree. Inspect the contents of unfamiliar archives and check extraction size and overwrite behaviour before writing into an important directory.

Packages and services8

Inspect the distribution, package source and service state before changing software. Repository metadata, installed packages, service enablement and current runtime state are distinct pieces of information.

Monitoring and diagnostics5

Compare repeated measurements and their scope before concluding that a server lacks resources. CPU load, memory accounting and disk latency need different interpretations.

Shell and environment11

Understand which shell and process receive a setting. Variables, aliases and the working directory can belong to one session. Files executed with the source command run as shell code with the account permissions.

Git, containers and DevOps6

Inspect repository state, container context and build instructions before taking action. Preserve uncommitted work and check the selected host or daemon so operations reach the intended environment.

Before running a command on your server

  1. Connect to the intended host and verify its host key fingerprint. Check the account and current directory before using relative paths.
  2. Replace sample paths, account names and hosts with your own values. Check that required tools are available on the remote Linux system.
  3. Start with inspection or a dry run where supported. Keep backups before changing files, account settings or storage.