Linux CheatSheet

Linux CheatSheet

Commands need to Master Linux

  1. whoami : It gives the name of the current user.
  2. touch : command that is used to make a file.
  3. pwd : to check current working directory.
  4. mkdiir foldername : to create a directory (folder).
  5. ls : to list contents in a current directory.
  6. cd dirname : to change directory.
  7. cd .. : to move directory back.
  8. cat filename : to view contents of file.
  9. clear : to clear terminal.
  10. echo "your text" : to print something.
  11. ls -la : list contents of directory.
  12. nano file_name : to write something to file.
  13. exit nano : ctrl + x > press y if want to save or press n for no > press enter.
  14. history : to all your previously executed commands.
  15. rm filename - to delete the file. ( be careful before deleting).
  16. vim command - to make file and put something at a time.
  17. apt-get update && apt-get upgrade : if you want to update your system as well upgrade(all the packages like ruby, python will get upgraded)
  18. mkdir file : to create a new directory.
  19. rmdir file : to remove directory.
  20. man ls : open the manual of ls.
  21. cp test.txt /home/ : copy the file to the directory home.
  22. chmod : to change the permission of a file.

Did you find this article valuable?

Support Sarvesh's Blog by becoming a sponsor. Any amount is appreciated!