Mastering Linux Commands: A Comprehensive Cheat Sheet for Every User

  1. ls - List directory contents

     ls [options] [file/directory]
    
  2. cd - Change directory

     cd [directory]
    
  3. pwd - Print working directory

     pwd
    
  4. mkdir - Make directory

     mkdir [directory]
    
  5. rm - Remove files or directories

     rm [options] [file/directory]
    
  6. cp - Copy files or directories

     cp [options] source destination
    
  7. mv - Move or rename files or directories

     mv [options] source destination
    
  8. cat - Concatenate and display files

     cat [options] [file]
    
  9. more - Display output one screen at a time

     more [file]
    
  10. less - Display output one screen at a time, backward as well

    less [file]
    
  11. head - Output the beginning of a file

    head [options] [file]
    
  12. tail - Output the end of a file

    tail [options] [file]
    
  13. grep - Search for patterns in files

    grep [options] pattern [file]
    
  14. chmod - Change file permissions

    chmod [options] mode file
    
  15. chown - Change file ownership

    chown [options] user:group file
    
  16. find - Search for files in a directory hierarchy

    find [path] [options] [expression]
    
  17. tar - Manipulate archives

    tar [options] [archive-file] [files...]
    
  18. df - Report filesystem disk space usage

    df [options]
    
  19. du - Estimate file space usage

    du [options] [file/directory]
    
  20. ps - Report process status

    ps [options]
    
  21. top - Display Linux processes

    top
    
  22. free - Display amount of free and used memory in the system

    free [options]
    
  23. hostname - Show or set the system's host name

    hostname [options]
    
  24. ifconfig - Configure network interface parameters

    ifconfig [interface] [options]
    
  25. ping - Send ICMP ECHO_REQUEST to network hosts

    ping [options] host
    
  26. wget - Retrieve files from the web

    wget [options] [URL]
    
  27. ssh - OpenSSH SSH client

    ssh [user@]hostname [command]
    
  28. scp - Secure copy (remote file copy program)

    scp [options] [user@]from-host:source-file [user@]to-host:destination-file
    
  29. man - Display manual pages

    man [command]
    
  30. info - Display program information

    info [command]
    
  31. passwd - Change user password

    passwd [username]
    
  32. su - Substitute user identity

    su [options] [username]
    
  33. sudo - Execute a command as another user

    sudo [options] command
    
  34. date - Print or set the system date and time

    date [options]
    
  35. cal - Display a calendar

    cal [options]
    
  36. uptime - Show how long the system has been running

    uptime
    
  37. who - Show who is logged on

    who [options]
    
  38. w - Show who is logged on and what they are doing

    w [options]
    
  39. last - Show a listing of last logged in users

    last [options]
    
  40. history - Display the history list with line numbers

    history [options]
    
  41. chmod - Change the mode of a file (permissions)

    chmod [options] mode file
    
  42. chown - Change file owner and group

    chown [options] owner[:group] file
    
  43. uptime - Show how long the system has been running

    uptime
    
  44. wc - Print newline, word, and byte counts for each file

    wc [options] [file]
    
  45. echo - Display a line of text

    echo [options] [string]
    
  46. kill - Terminate processes

    kill [options] pid
    

These commands should cover a wide range of basic Linux tasks and are essential for any Linux user or administrator.

1
Subscribe to my newsletter

Read articles from Vaishnavi Shivde directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Vaishnavi Shivde
Vaishnavi Shivde

Aspiring DevOps Engineer | Linux | Git & Github | Shell Scripting | Docker | CI/CD Jenkins | Kubernetes | AWS | Terraform | JIRA | Python |