DEV Community

Cover image for Linux Commands Cheat Sheet
Boni Yeamin
Boni Yeamin

Posted on

Linux Commands Cheat Sheet

Image description1. cd — Change directory

  1. ls — List directory contents
  2. pwd — Print working directory
  3. cat — Concatenate and display files
  4. touch — Create an empty file
  5. cp — Copy files and directories
  6. mv — Move or rename files and directories
  7. rm — Remove files and directories
  8. mkdir — Create a new directory
  9. rmdir — Remove an empty directory
  10. cut — Cut out sections of a file
  11. gzip — Compress or decompress files using gzip
  12. gunzip — Decompress files compressed with gzip
  13. find — Find files and directories matching a pattern
  14. grep — Search for a pattern in a file
  15. awk — Pattern scanning and processing language
  16. sed — Stream editor for filtering and transforming text
  17. head — Display the first few lines of a file
  18. tail — Display the last few lines of a file
  19. sort — Sort lines of a file
  20. uniq — Remove duplicate lines from a file
  21. wc — Count lines, words, and characters in a file
  22. diff — Compare two files line by line
  23. patch — Apply a patch to a file
  24. chmod — Change permissions of files and directories
  25. chown — Change the owner of a file or directory
  26. chgrp — Change the group ownership of a file or directory
  27. ps — List running processes
  28. top — Display system resource usage and process information
  29. kill — Send a signal to a process to terminate it
  30. du — Display disk usage of files and directories
  31. df — Display free disk space on the file system
  32. mount — Mount a file system
  33. umount — Unmount a file system
  34. ping — Test connectivity to a network host
  35. ssh — Secure shell remote login and command execution
  36. scp — Secure copy files between hosts
  37. rsync — Remote file and directory synchronization
  38. curl — Transfer data from or to a server using various protocols
  39. wget — Retrieve files from the web using various protocols
  40. ftp — File Transfer Protocol client
  41. sftp — Secure File Transfer Protocol client
  42. telnet — Telnet client
  43. nslookup — DNS lookup utility
  44. dig — DNS lookup utility
  45. netstat — Display network connections and statistics
  46. ifconfig — Configure network interfaces
  47. route — Display or modify the routing table
  48. iptables — Firewall and packet filtering utility
  49. hostname — Display or set the hostname of the system
  50. date — Display or set the system date and time
  51. timedatectl — Control the system date and time
  52. uname — Display system information
  53. whoami — Display the current user ID
  54. id — Display user and group information
  55. su — Switch user to become another user
  56. sudo — Execute a command with superuser privileges
  57. passwd — Change the password of a user account
  58. useradd — Create a new user account
  59. userdel — Delete a user account
  60. usermod — Modify a user account
  61. groupadd — Create a new group
  62. groupdel — Delete a group
  63. groupmod — Modify a group
  64. finger — Display information about users on the system
  65. last — Display information about recent logins
  66. history — Display command history
  67. echo — Print a message to the terminal
  68. printf — Format and print data
  69. lshw — Displays hardware information
  70. lspci — Displays information about PCI buses and devices.
  71. lsusb — Displays information about USB buses and devices.
  72. hwinfo — Displays detailed hardware information.
  73. free — Displays memory usage.
  74. vmstat — Displays system memory, processor, and I/O statistics.
  75. iostat — Displays CPU and disk I/O statistics.
  76. uptime — Displays system uptime and load averages.
  77. journalctl — Displays the system journal.
  78. dmesg — Displays the kernel ring buffer.
  79. crontab — Schedules recurring tasks.
  80. at — Schedules a one-time task.
  81. service — Manages system services.
  82. systemctl — Controls system services in systemd-based distributions.
  83. traceroute — Traces the network path to a remote host.
  84. bzip2 — Compresses files using the bzip2 algorithm.
  85. unzip — Extracts files from a ZIP archive.
  86. tee — Redirect output to multiple files
  87. chroot — Change the root directory for a process
  88. ps aux — Display information about all running processes
  89. less — Display file contents in a paginated format
  90. more — Display file contents one page at a time
  91. ln — Create links between files
  92. realpath — Print the resolved absolute path of a file
  93. watch — Execute a command periodically and display the output
  94. cal — Display a calendar
  95. tar -xzvf — Extract files from a compressed archive
  96. tar -czvf — Create a compressed archive
  97. whereis — Locate the binary, source, and manual page files for a command
  98. locate — Find files by name
  99. which — Display the full path to an executable
  100. 21

Top comments (0)