DEV Community

Cover image for Linux for Power Users: A Cheatsheet of 50 Most Used Commands
Muhammad ABir
Muhammad ABir

Posted on • Edited on

Linux for Power Users: A Cheatsheet of 50 Most Used Commands

A Linux commands cheatsheet is a quick reference guide for users to easily access and utilize various Linux commands. It includes a list of commonly used commands along with examples and explanations of their usage. This resource can be helpful for both beginners learning the Linux command line and experienced users looking to improve their efficiency and productivity. It can be used as a quick reference for daily tasks, troubleshooting, and system administration.

  1. ls - List files and directories in a directory. ls /home
  2. cd - Change the current working directory. cd /home/documents
  3. mkdir - Create a new directory. mkdir new_directory
  4. rmdir - Remove an empty directory. rmdir old_directory
  5. rm - Remove files or directories. rm file.txt
  6. touch - Create a new file or update the timestamp of an existing file. touch new_file.txt
  7. cp - Copy files or directories. cp file.txt /home/documents/
  8. mv - Move or rename files or directories. mv file.txt /home/documents/
  9. pwd - Print the current working directory. pwd
  10. cat - Display the contents of a file. cat file.txt
  11. less - Display the contents of a file one page at a time. less file.txt
  12. head - Display the first few lines of a file. head file.txt
  13. tail - Display the last few lines of a file. tail file.txt
  14. grep - Search for a string in a file or output. grep "search_string" file.txt
  15. find - Search for files in a directory. find / -name "file.txt"
  16. man - Display the manual for a command. man ls
  17. chmod - Change file permissions. chmod 755 file.txt
  18. chown - Change file ownership. chown user:group file.txt
  19. su - Switch to another user. su root
  20. sudo - Run a command as the superuser. sudo apt-get update
  21. passwd - Change the password for a user. passwd
  22. df - Display filesystem usage. df -h
  23. du - Display disk usage for a directory. du -sh /
  24. free - Display memory usage. free -m
  25. ps - Display process information. ps aux
  26. kill - Send a signal to a process. kill -9 1234
  27. top - Display real-time process information. top
  28. htop - A more user-friendly version of top. htop
  29. systemctl - Control system services. systemctl start apache2
  30. apt-get - Package manager for Debian-based systems. apt-get update
  31. yum - Package manager for Red Hat-based systems. yum update
  32. wget - Download files from the internet. wget https://example.com/file.zip
  33. curl - Transfer data from or to a server using various protocols. curl https://example.com
  34. ping - Test the connectivity to a host. ping example.com
  35. traceroute - Trace the route to a host. traceroute example.com
  36. ssh - Securely connect to a remote host. ssh user@example.com
  37. scp - Securely copy files to or from a remote host. scp file.txt user@example.com:/path/to/file
  38. tar - Create or extract files from a tar archive. tar -xvf file.tar
  39. gzip - Compress or decompress files. gzip file.txt
  40. gunzip - Decompress files compressed with gzip. gunzip file.txt.gz
  41. bzip2 - Compress or decompress files. bzip2 file.txt
  42. bunzip2 - Decompress files compressed with bzip2. bunzip2 file.txt.bz2
  43. uname - Display system information. uname -a
  44. date - Display the current date and time. date
  45. cal - Display a calendar. cal
  46. time - Measure the running time of a command. time ls /
  47. history - Display the command history. history
  48. alias - Create a shortcut for a command. alias ll='ls -l'
  49. bash - Start the Bash shell. bash
  50. exit - Exit the current shell. exit

Top comments (0)