Common used command lines

  1. pwd: present working directory, to show current position
  2. ls: list the contents, to show the list of files
  3. cd: change directories, used for going to certain folder/file. e.g. cd ~/desktop/-> go to desktop
  4. cd ..: go back to the previous directory
  5. touch: to create a new file: touch tryout.txt
  6. cat(1): display the content of the file: cat tryout.txt
    cat(2): to create a new file: cat > aNewFile.txt
    cat(3): to concatenate two files: cat tryout1.txt tryout2.txt > tryout3.txt
    note: There are still a bunch of usages of 'cat', it's a powerful and complex tool!
  7. mkdir: make a directory: mkdir kk->then create a folder called kk
  8. rmdir: remove a directory: rmdir kk->then delete the given folder kk
  9. rm: remove a file: rm tryout.txt
  10. clear: clear the current page(not delete, just present a clean page)
  11. control+c: to end a command