๐Ÿง Linux Commands - A Complete Handbook for beginners ๐Ÿ’ป

๐Ÿง Linux Commands - A Complete Handbook for beginners ๐Ÿ’ป

ยท

4 min read

Hello folks, You might be working on GUI based interfaces to do your daily tasks. But do you know that you can do the same and some advance tasks just using the terminal but more efficiently. Also having a deep understanding of the terminal commands comes handy when you want to be more productive and fast. Terminal commands can do more than just installing the softwares on your Linux distro. In this blog I have share commands which you should definitely try and use in you daily life. I guarantee you that you will feel the power of terminal commands after you use them couple of times.

Without wasting anymore time let's jump into it.

  1. cd directory_name ==> Changes the path to directory_name
  2. cd .. ==> Go back to previous directory
  3. cd or cd ~ ==> Go back to root directory
  4. mkdir directory_name ==> Makes a new directory at that location
  5. rmdir directory_name ==> This will delete the directory (Cannot be undone)
  6. ls ==> Lists all the directories in the location
  7. touch file_name ==> Creats a file of file_name (File extension is compulsary)
  8. echo random_text ==> Will print random_text on the terminal screen
  9. echo random_text > file_name ==> It will put the random_text into the file_name instead of printing on the terminal screen
  10. man command_name ==> This will display all the information about the specific terminal command_name
  11. help ==> This will help you by providing some comman commands if you are unable to recall them
  12. history ==> Shows all the history of your commands
  13. ps ==> This will show all the processes running on you machine
  14. pwd ==> This will show your current path in terminal
  15. cat file_name ==> Prints all the content in the given file_name.
  16. cp file_name location ==> This will copy the file at the specific location
  17. cp file_name copyed_file_name ==> This makes the copy of the file_name with name as copyed_file_name.
  18. mv file_name location ==> This will move the file_name to the given location.
  19. mv file_name new_file_name ==> This will rename the file_name to new_file_name.
  20. rm -rf directory_name ==> This will recursively(-r) and forcefully (-f) will delete the directory
  21. find . ==> Finds everything in the directory.
  22. find directory_name/ ==> Finds everything in the given directory_name.
  23. find directory_name -type d ==> Finds only directory in the directory_name
  24. find directory_name -type f ==> Finds only file_name in the directory_name
  25. find . -type f -name "file_name" ==> Finds everything with type file and name as file_name
  26. find . -type f -name "*.txt" ==> Finds everything with type file and whatever has extention as .txt
  27. find . -empty ==> Finds all the directories and files that are empty
  28. clear ==> clears the terminal screen
  29. grep "random_text" file_name ==> Finds the random_text in the file_name only if the exact word is found (it is case sensitive as well)
  30. grep "random_text" file_name -w ==> Finds the random_text in the file_name only prints if random_text is found as a whole word(-w)
  31. grep "random_text" file_name -i ==> Finds the random_text in the file_name and prints regardless of the case sensitiveness. It doesn't mind the case sensitiveness if (-i) is added
  32. grep "random_text" file_name -n ==> Finds the random_text in the file_name and prints the the line number (-n) as well.
  33. grep "random_text" -win ./*.txt ==> Finds the random text in all the text (.txt) files in the directory and ensure that the word found is whole word (-w), regardless of case sensitiveness (-i), and with line number (-n)
  34. diff file_1 file_2 ==> Shows the difference in two files
  35. ping www.example_website.com ==> This will show your internet speed for recieving the pacakages.
  36. curl www.example_website.com ==> This will show the html of that example_website
  37. top ==> This will show cpu usage, memory usage etc at current time
  38. nslookup -type=type service_name ==> Change the type of the information query
  39. nslookup -debug example_website ==> used to find the IP address that corresponds to a host, or the domain name that corresponds to an IP address.
  40. curl -O pdf_url_on_internet ==> It downloads the media from the url to the location

โค๏ธ Thank you for reading โค๏ธ

๐ŸŒ Like | Follow | Share ๐ŸŒ

Did you find this article valuable?

Support Kaiwalya Koparkar by becoming a sponsor. Any amount is appreciated!

ย