Complete List of Common Linux Server Commands

Mastering common Linux commands is the foundation of server management.

File and Directory Operations:

  • ls -la - List all files with detailed information

  • cd /path - Change directory

  • pwd - Display the current directory

  • mkdir dir - Create a directory

  • rm -rf dir - Delete a directory and its contents

  • cp -r src dst - Copy a directory

  • mv old new - Move or rename files/directories

  • chmod 755 file - Modify file permissions

  • chown user file - Change file owner


File Viewing and Editing:

  • cat file - Display file contents

  • less file - View file contents page by page

  • head -n 10 file - View the first 10 lines of a file

  • tail -f file - View log files in real time

  • vi file - Edit a file

  • grep keyword file - Search for specific content in a file


System Management:

  • top - System monitoring

  • htop - Enhanced system monitoring tool

  • free -h - View memory usage

  • df -h - View disk usage

  • du -sh dir - View directory size

  • ps aux - View all running processes

  • kill -9 pid - Force terminate a process


Network Related Commands:

  • ifconfig - View network interface information

  • ip addr - View IP address information

  • ping host - Test network connectivity

  • netstat -tlnp - View listening ports

  • curl url - Send HTTP requests

  • wget url - Download files


Service Management:

  • systemctl start service - Start a service

  • systemctl stop service - Stop a service

  • systemctl restart service - Restart a service

  • systemctl status service - Check service status

  • systemctl enable service - Enable a service to start automatically at boot time

Was this answer helpful? 0 Users Found This Useful

Related Articles

Detailed Tutorial on Linux Server Firewall Configuration

Firewall is the first line of defense for server security, and proper configuration is essential....

Steps and methods for handling zombie processes on Linux cloud servers

In daily use of Linux cloud servers, many website owners will encounter processes with a state of...

What to do if the cloud server port is occupied due to Nginx configuration error?

In the process of deploying or modifying Nginx configuration, many users often overlook a key...

Setting up Two-Factor Authentication for Linux Server

Why Use 2FA on a Linux Server? Despite their strong security, SSH keys are not infallible,...

Troubleshooting Common Network Related Issues on Linux Servers

If you are running into this blog post, chances are you have a Linux based server that is...