Linux Cheat Sheet

Linux Cheat Sheet

Table of contents

No heading

No headings in the article.

#day12 of #90daysofdevopschallenge

  1. cd - Change directory

    Use this command to navigate to different directories in the file system.

    Ex. cd pictures will take you to the "pictures" directory.

  2. cd .. - Move one level up.

    cd - To change to a particular directory

    cd / - Move to the root directory

  3. man - Access manual pages. This command provides documentation for other commands. For example, man ls displays the manual page for the "ls" command

  4. ls - List files and directories. This command shows the contents of the current directory. Adding options like -l or -a (for hidden files)provides more detailed information.

  5. ls -R - lists files in sub-directories as well

    ls -a - lists hidden files as well

    ls -al - lists files and directories with detailed information like permissions, size, owner, etc.

  6. pwd - Present Working Directory.

    It displays the path of the current directory you are in.

  7. mkdir - make directory. Use this command to create a new directory. For example, $mkdir git_data will create a directory named git_data in the current location.

  8. rm - Remove files or directories. This command deletes files and directories

    permanently. To remove a file, use rm filename. To remove a directory and its contents, use the rm -r directory name.

  9. cp - Copy files and directories. Use this command to make copies of files or directories. For example,cp myfile.txt /path/to/destination will copy "myfile.txt " to the specified destination.

  10. mv - Move or rename files and directories. This command is used to move files or directories to a different location or rename them. For example, mv file.txt /path/to/destination will move "file.txt " to the specified destination.

  11. cat - Concatenate and display file content. This command shows the contents of a file on the terminal. For example, cat file.txt will display the content of "file.txt"

  12. grep - Search for text within files. Use this command to search for specific text within files. For example- grep keyword file.txt will search for the keyword in "file.txt".

  13. chmod - Change file permissions. This command is used to change the permissions of a file or directory. For example, chmod +x script.sh makes "script.sh " executable.

  14. sudo - Execute a command with superuser privileges. Use this command to run a command as the super user(administrator).it is often used for system administration tasks. For example,sudo apt-get update updates the package lists with administrator privileges.

  15. apt-get - Package manager command. This command is used to install, update or remove software packages in Debian-based distributions. For example, sudo apt-get install package-name installs a package.

  16. gzip- Compress or decompress files using gzip.

  17. gunzip-Decompress files compressed with gzip.

  18. find - Find files and directories matching a pattern.

  19. wget - download files from the web. Use this command to download files from the internet. For example,wget https://example.com/file.txt will download "file.txt" from the specified URL.

  20. ping - Check network connectivity. This command is used to check if a network host is reachable. For example, ping google.com.

  21. adduser UserName - Adds a new user to the system.

  22. passwd -l UserName - Changes the password of a user.

  23. userdel -r UserName - Removes a user from the system, including their home directory.

  24. usermod -a -G GroupName UserName- Adds a user to a specific group.

  25. deluser UserName GroupName - Removes a user from a specific group.

  26. touch - Create an empty file.

  27. awk - pattern scanning and processing language.

  28. sed - stream editor for filtering and transforming text.

  29. head - Display the first few lines of a file.

  30. tail - display the last few lines of a file.

  31. wc - Count lines, words, and characters in a file.

  32. sort - Sort lines of a file.

  33. diff - Compare two files line by line.

  34. chown - Change the owner of a file or directory.

  35. chgrp - Change the group ownership of a file or directory.

  36. ps - List running processes.

  37. top - Display system resource usage and process information.

  38. kill - Send a signal to a process to terminate it.

  39. du - Display disk usage of files and directories.

  40. df - Display free disk space on the file system.

  41. mount - Mount a file system.

  42. umount - Umount a file system.

  43. ssh - Secure shell remote login and command execution.

  44. scp - Secure copy files between hosts.

  45. rsync - Remote file and directory synchronization.

  46. curl - Transfer data from or to a server using various protocols.

  47. ftp - File Transfer Protocol client

  48. sftp -Secure File Transfer Protocol client

  49. telnet - Telnet client

  50. nslookup - DNS lookup utility.

  51. dig - Domain Information Groper. It is used for retrieving information about DNS name servers

  52. netstat - Display network connections and statistics

  53. ifconfig - Configure network interfaces

  54. route - Display or modify the routing table

  55. iptables - Firewall and packet filtering utility

  56. hostname - Display or set the hostname of the system

  57. date - Display or set the system date and time

  58. uname - Display system information

  59. whoami - Display the current user ID

  60. id - Display user and group information

  61. su - Switch user to become another user

  62. groupadd - Create a new group

  63. groupmod - Modify a group

  64. history - Display command history

  65. echo - print a message to the terminal

  66. hwinfo - Displays detailed hardware information

  67. free - Displays memory usage

  68. vmstat - Displays system memory, processor, and I/O statistics

  69. iostat - Displays CPU and disk I/O statistics

  70. uptime - Displays system uptime and load averages.

  71. crontab - Schedules recurring tasks

  72. traceroute - Traces the network path to a remote host

  73. less - Display file contents in a paginated format

  74. more - Display file contents one page at a time

  75. chroot - Change the root directory for a process

  76. alias - Instructs the shell to replace one string with another string while executing the commands

  77. reset - The best method to reset your terminal is with the reset command

  78. exit - Used to exit the shell where it is currently running

  79. logout - Performs the task of logging out the logged-in user from the system

  80. script - Used to make typescript or record all the terminal activities

    Thanks for reading!!!!!