50 Essential Linux Commands Every Sysadmin Should Master

For users who want a no-nonsense, technical rundown of key Linux commands, here’s a curated list of 50 commands with fresh wording and a re-ordered sequence to boost your productivity on the command line.

  1. pwd – Displays your current working directory.
    Example:

    pwd
    
  2. cd – Changes your directory to the specified path.
    Example:

    cd /path/to/directory
    
  3. ls – Lists files and folders in the current directory.
    Example:

    ls -la
    
  4. mkdir – Creates a new directory.
    Example:

    mkdir new_folder
    
  5. touch – Generates an empty file or updates the timestamp on an existing file.
    Example:

    touch newfile.txt
    
  6. rm – Deletes files or directories (use with caution).
    Example:

    rm unwanted_file.txt
    
  7. cp – Copies files or directories from one location to another.
    Example:

    cp source.txt destination.txt
    
  8. mv – Moves or renames files and directories.
    Example:

    mv oldname.txt newname.txt
    
  9. rmdir – Removes an empty directory.
    Example:

    rmdir empty_folder
    
  10. cat – Outputs the content of a file to the terminal.
    Example:

    cat file.txt
    
  11. less – Opens files in a paginated view for easier reading and backward scrolling.
    Example:

    less file.txt
    
  12. more – Similar to less, it displays file content page by page.
    Example:

    more file.txt
    
  13. head – Shows the first few lines of a file.
    Example:

    head -n 10 file.txt
    
  14. tail – Displays the last part of a file; useful for log files.
    Example:

    tail -n 10 file.txt
    
  15. find – Searches for files and directories based on specified criteria.
    Example:

    find / -name "targetfile.txt"
    
  16. grep – Filters text or searches for specific patterns within files.
    Example:

    grep "search_term" file.txt
    
  17. locate – Quickly finds files by name using a prebuilt database.
    Example:

    locate file.txt
    
  18. which – Reveals the full path of shell commands.
    Example:

    which python3
    
  19. whereis – Locates the binary, source, and manual pages for a command.
    Example:

    whereis gcc
    
  20. chmod – Modifies file or directory permissions.
    Example:

    chmod 755 script.sh
    
  21. chown – Changes the owner and/or group of a file or directory.
    Example:

    sudo chown user:group file.txt
    
  22. df – Reports disk space usage of file systems.
    Example:

    df -h
    
  23. du – Estimates the file space usage of directories and files.
    Example:

    du -sh /path/to/directory
    
  24. free – Displays memory usage statistics.
    Example:

    free -m
    
  25. top – Provides a real-time view of system processes and resource usage.
    Example:

    top
    
  26. ps – Lists current running processes.
    Example:

    ps aux
    
  27. kill – Terminates a process by its Process ID (PID).
    Example:

    kill 1234
    
  28. killall – Ends processes by name instead of PID.
    Example:

    killall process_name
    
  29. history – Shows a list of previously executed commands.
    Example:

    history
    
  30. alias – Creates shortcuts for longer commands.
    Example:

    alias ll="ls -la"
    
  31. echo – Prints text or variable values to the terminal.
    Example:

    echo "Hello, World!"
    
  32. uname – Displays system information such as the kernel name and version.
    Example:

    uname -a
    
  33. date – Outputs or sets the current date and time.
    Example:

    date
    
  34. cal – Presents a simple calendar.
    Example:

    cal
    
  35. man – Opens the manual page for other commands.
    Example:

    man ls
    
  36. ssh – Securely connects you to a remote system over a network.
    Example:

    ssh user@hostname
    
  37. scp – Securely copies files between hosts using SSH.
    Example:

    scp file.txt user@remote:/path/to/directory
    
  38. wget – Retrieves files from the web via HTTP, HTTPS, or FTP.
    Example:

    wget https://example.com/file.zip
    
  39. curl – Transfers data with URL syntax; often used for API interactions.
    Example:

    curl -O https://example.com/file.zip
    
  40. tar – Archives multiple files into a single file, often for backup purposes.
    Example:

    tar -czvf archive.tar.gz /path/to/directory
    
  41. gzip – Compresses files using the GNU zip algorithm.
    Example:

    gzip file.txt
    
  42. gunzip – Decompresses files that were compressed with gzip.
    Example:

    gunzip file.txt.gz
    
  43. zip – Combines and compresses files into a zip archive.
    Example:

    zip archive.zip file1.txt file2.txt
    
  44. unzip – Extracts files from a zip archive.
    Example:

    unzip archive.zip
    
  45. ping – Sends ICMP echo requests to test network connectivity.
    Example:

    ping google.com
    
  46. traceroute – Tracks the route packets take to a network host.
    Example:

    traceroute google.com
    
  47. netstat – Displays network connections, routing tables, and interface statistics.
    Example:

    netstat -tuln
    
  48. ip – Manages and displays networking, replacing older tools like ifconfig.
    Example:

    ip addr show
    
  49. sudo – Executes commands with superuser privileges.
    Example:

    sudo apt-get update
    
  50. apt-get – Handles package management for Debian-based systems.
    Example:

    sudo apt-get install package_name